Skip to content

Instantly share code, notes, and snippets.

@andrewgalbraith
Forked from sharunkumar/GetAllBinaries.ps1
Created July 31, 2023 00:59
Show Gist options
  • Select an option

  • Save andrewgalbraith/0b7be7fa6abc8dd926e1ca24a0488d78 to your computer and use it in GitHub Desktop.

Select an option

Save andrewgalbraith/0b7be7fa6abc8dd926e1ca24a0488d78 to your computer and use it in GitHub Desktop.
PowerShell Script to get all the binaries in the path variable, on windows
$env:Path.split(";") | ForEach-Object {
Get-ChildItem -Path $_ -ErrorAction SilentlyContinue
} | Where-Object { $env:PATHEXT.ToLower() -match $_.Extension.ToLower() } | Select-Object FullName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment