Today I needed to check several scripts to see which ones used (the same) global field (don’t ask). I was doing this at work and Powershell proved to be surprisingly adept at doing this. All I needed was:
Get-ChildItem "Scripts_Folder" -recurse | Select-String -pattern "Field_Name" | group path | select name
… where Scripts_Folder is the folder containg the scripts and Field_Name is the field I was searching for.
Powershell returned a simple list of all of the files containing the field. I can see me needing to use this again, which is why I’m making a note of it here.