Command referenceGet-Command
Get-Command command (Windows / PowerShell)
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 / option | Meaning |
|---|---|
| -Name | Find commands by name or wildcard. |
| -CommandType | Restrict results to aliases, cmdlets, functions, or applications. |
| -Module | Find commands exported by selected modules. |
| -Syntax | Display command syntax. |
| -All | Return 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.
Related commands
- Get-HelpDisplay syntax, parameter details, examples, and conceptual PowerShell help.
- Where-ObjectFilter pipeline objects by property values or a script block predicate.
- whichLocate the executable selected from the current PATH.
- ForEach-ObjectRun a script block for each object arriving through the pipeline.
- manRead installed manual pages for commands, formats, and APIs.
- historyDisplay or modify the current shell's command history.
- clsClear visible text from the Command Prompt screen.
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.