Use Powershell to find text in files
If you need to use Powershell to find text in files in a folder structure you can use the Get-Childitem command to look for those files.
Get-ChildItem -Recurse *.txt | Select-String texttofind | Select-Object -Unique Path
- The -Recurse sends the command to all subfolders.
- The Select-String defines the text to be found in the files.
- The Select-Object defines the output to the screen.