I’m trying to create a one-liner to tail a logfile. I use this:
powershell -NoProfile -ExecutionPolicy Unrestricted -Command (get-content “D:\Test.txt” -Tail 10 -Wait)
The above command shows nothing but just hangs. If I try
powershell -NoProfile -ExecutionPolicy Unrestricted -Command (get-content “D:\Test.txt” -Tail 10)
Firstly, when posting code in the forum, please can you use the preformatted text </> button. It really helps us with readability, and copying and pasting your code (we don’t have to faff about replacing curly quote marks to get things working).