reading from a log file as it updates – Powershell.

Gets everything in log file an all future changes.

Get-Content “C:\tmp\mylogfile.log” -Wait

The tail parameter will retrieve a specific number of lines from the  bottom of the file.

Get-Content “C:\tmp\mylogfile.log” -Wait -tail 1

I retrieve the last written log file entry as it occurs.