Searching through all those script files: Find-Script

If you are like me, you have built up a good amount of scripts over time and haven’t yet made it to the point of creating modules or other ways to handle all of them. I needed a way to be able to search through all these scripts to find the little gems that hide within.

I came up with this short and sweet script I can run quickly to find the tidbits I am looking for. The script will prompt for a keyword and then search recursively the path specified showing the output via Out-GridView.

Not a perfect solution but works very well. It could also be tweaked to search files other than *.ps1 easily enough.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s