Skip to main content

Command referenceGet-Command

Get-Command command (Windows / PowerShell)

WindowsPowerShellotherbeginner

What it does

Discover commands, aliases, functions, scripts, and applications available to PowerShell. Guides covering the get-command powershell usually need pipeline-friendly examples, common parameters, and how the cmdlet compares with classic CMD or Linux tools. This page includes syntax, options, and copyable PowerShell examples.

Discover commands, aliases, functions, scripts, and applications available to PowerShell.

Syntax

Get-Command [[-Name] <String[]>] [-CommandType <CommandTypes>] [-Module <String[]>] [-Syntax] [-All]

Common options

Flag / optionMeaning
-NameFind commands by name or wildcard.
-CommandTypeRestrict results to aliases, cmdlets, functions, or applications.
-ModuleFind commands exported by selected modules.
-SyntaxDisplay command syntax.
-AllReturn every matching command in resolution order.

Practical examples

Find command

Get-Command Get-ChildItem

Returns command metadata.

Discover verbs

Get-Command -Verb Get -Noun Service

Finds matching verb-noun commands.

All curl meanings

Get-Command curl -All

Shows every command or application resolving as curl.

Linux ↔ Windows equivalent

Closest match: which (Linux / bash / sh / zsh). Locate the executable selected from the current PATH.

Common mistakes

  • Assuming the first name match is the only command available.
  • Using `where` in PowerShell expecting CMD's executable search instead of Get-Command.

FAQ

What does Get-Command do in PowerShell?

Discover commands, aliases, functions, scripts, and applications available to PowerShell.

How can I see examples for Get-Command?

Run `Get-Help Get-Command -Examples`, then adapt an example to the provider and objects you are using.

What is a practical Get-Command example?

Try `Get-Command Get-ChildItem` — Returns command metadata.

Does Get-Command return text or objects?

Get-Command normally participates in PowerShell's object pipeline; formatting seen in the console is a view of those objects.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.