Ying Li at myITforum.com

PowerShell & System Center

PowerShell script to search "string" in files

Let’s say that you have a log folder contain a lot of log.txt files and you want to find out which log file contain a particular “event” or “string”. The below script can accomplish just that

 

Get-ChildItem c:\log | select-strings “string”

Posted: Oct 24 2007, 08:48 PM by yli628 | with no comments
Filed under:

Comments

No Comments