Learn about Windows PowerShell
Summary: Quickly search files for text with Windows PowerShell.
How can I use Windows PowerShell to quickly search text files for a string?
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'
How about Word files? What's the trick to searching them for a string?
Good question, Doug. Hope someone can help.
Windows Desktop Search searches inside of Office files because it has extensions that allow it to index formatted files. The PowerShell "Select-String" CmdLet searches only in text files. Word files are NOT text files.
If you do not have Desktop Search installed or want to script this you need to open each file and use the Word search API.