Show file contents in real time in PowerShell

I have a powershell tab in which I would like to run the command and start scrolling through the contents of the log file as it updates. I do not want it to exit (until I ctrl + c) and just keep scrolling the file as it updates. How should I do it?

I was thinking about using a file observer , but I would have to program the logic to determine the added lines, and it just seems inefficient and, as it is, an easier way.

+5
source share
1 answer

You can do:

get-content file -wait
+9
source

All Articles