Discover commands with Get-Command in PowerShell

The PowerShell-native answer to 'does this command exist, and which one wins?' — it sees cmdlets, aliases, functions, and executables at once.

WindowsTerminaldeveloperpowershellLow risk
Run `Get-Command python -All` to list every matching command in precedence order; check the Source/Path to see which one executes.

01Command

Command
$ Get-Command python -All

02What it does

Get-Command searches all command sources — modules, aliases, functions, and PATH executables — so it catches conflicts that where.exe misses (like a profile alias shadowing a real program). Wildcards make it a discovery tool: `Get-Command -Noun Firewall` or `Get-Command *dns*` surfaces related cmdlets you didn't know existed. Adding -Syntax shows the parameter list of a cmdlet, and -ListImported / -Module narrow the search to what's actually loaded.

03Risk

RiskLow risk

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-Command - PowerShell
    SS64 · technical · 2026-09-17
    Evidence: SS64 shows Get-Command usage for discovering cmdlets, aliases, and executables with wildcards and -ParameterType filters.
  • Get-Command | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Get-Command returning command info including CommandType, Source, Path, and the -All switch to list all matches.

Last verified: 2026-09-17 · Category: Developer

06Related solutions