Skip to content

Instantly share code, notes, and snippets.

@bcdady
Created November 29, 2016 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcdady/fdb2028dc30776a0c1c2b48d7dcac6b6 to your computer and use it in GitHub Desktop.
Save bcdady/fdb2028dc30776a0c1c2b48d7dcac6b6 to your computer and use it in GitHub Desktop.
# Enumerate files (full path) that have a matching string found within
# In this example, only PowerShell files (*.ps*1) are being searched for the simple wildcard string 'servicegroup'
PS .\> gci -Path .\ -Filter *.ps*1 -Recurse -File | Select-String -SimpleMatch servicegroup | group -Property Path | select -ExpandProperty Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment