I'm not so hot with PowerShell yet, but have managed to get this command to work quite nicely:
get-childitem "C:\Code\WC1" -Recurse | select-string "insert into\s+my_table"
Thing is, I know I'm going to struggle to remember this, so how can I make it into a function where the path supplied to get-childitem
and the search regex are parameters?
I'm using PowerShell 2.0.