Powershell – Read file As It Is Updated

The following cmdlet will read the last 100 lines of a file and wait forever and display any additions to the file

Get-Content c:\path\log.txt -Last 100 -Wait


Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.