Wednesday, February 22, 2017

Searching for a string in text files

I hate it when I know I used a specific piece of code somewhere, but cannot remember which file had it. So I use this: Get-ChildItem -Path "\\server\folder\" -Recurse | Select-String -Pattern "some string" | Group Path | Select Name