Saturday, October 16, 2010

Powershell - Search a string inside a text file

Get-Content cmd let will allow reading content from a text file and the following piped cmdlet can be used to search a string inside the text file given as input


(Get-Content "Full path of the text file") | ? {$_ -match 'searchstring''}

No comments: