Problem scenario
You want to find an .html, .txt, or .rtf file that has the pattern "cool" in it. You do not need to search for .doc or .docx files. How do you write a PowerShell command to search the contents of files and subdirectories of a given folder to see if they have a text string that matches the word "cool"?
Solution
Run these two commands:
cd c:\to\the\folder\you\want\
Get-ChildItem -recurse | Select-String -pattern "cool"