This Script will search c:\temp to find all files called test.txt that contains the string “server2”.
Get-ChildItem -Path c:\temp -File -Recurse -include test.txt | Select-String -pattern "server2" | Group path | Select Name
This Script will search c:\temp to find all files called test.txt that contains the string “server2”.
Get-ChildItem -Path c:\temp -File -Recurse -include test.txt | Select-String -pattern "server2" | Group path | Select Name
Recent Comments