PowerTip: Use PowerShell to Parse Text Files

Summary: Quickly search files for text with Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to quickly search text files for a string?

Hey, Scripting Guy! Answer Use the Select-String cmdlet and supply a path and a pattern.
          In the following example, I search the current folder for the computer name dc13:

Select-String -Path *.txt -Pattern ‘dc13’