find string in all files powershell

Sure, here is a PowerShell script that can be used to find a string in all files:

$rootPath = "C:\path\to\directory"  
$searchString = "your search string"

Get-ChildItem -Path $rootPath -Recurse -File | Select-String -Pattern $searchString | Group-Object -Property Path | Select-Object -Property Name

This script will recursively search for the specified string in all files within the specified directory and its subdirectories. The output will display the file paths where the string is found.