We can use PowerShell to monitor files for changes. The Get-Content Cmdlet provides the Wait parameter. The wait parameter will monitor the end of a file for any changes. This task can be useful in a number of situations such as monitoring a log file for changes.
1 | Get-Content application.log -Wait
|
The wait parameter will output any new content appended to the log file to the console.
In this small tutorial we looked at how PowerShell can be used to monitor files for changes.