Skip to content

Instantly share code, notes, and snippets.

@bcdady
Last active November 10, 2016 14:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcdady/cab5c71366a8311e7a04 to your computer and use it in GitHub Desktop.
Save bcdady/cab5c71366a8311e7a04 to your computer and use it in GitHub Desktop.
Find a string within any file included in a PowerShell module
# search string within All Modules
# e.g. find '-function' within any file in a module
$env:PSModulePath | ForEach-Object { $_ -split ';' | Get-ChildItem -Filter *.ps* -Recurse | Select-String -Pattern 'Write-Log' -SimpleMatch}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment