PowerShell – How to monitor a text file in realtime find string

Get-Content "L:\yourfolder\logs\20190524.log" -wait | where { $_ -match "56315" }

Leave a comment

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