Concept Flow - Command discovery (Get-Command)
Start
Run Get-Command
PowerShell searches command types
Find matching commands
Display command info
End
Get-Command searches for commands matching your input and shows their details.
Get-Command Get-Process Get-Command -Name Get-Item Get-Command -Verb Get -Noun Process
| Step | Command Run | Search Type | Match Found | Output Summary |
|---|---|---|---|---|
| 1 | Get-Command Get-Process | Exact name | Get-Process cmdlet | Shows details of Get-Process cmdlet |
| 2 | Get-Command -Name Get-Item | Exact name | Get-Item cmdlet | Shows details of Get-Item cmdlet |
| 3 | Get-Command -Verb Get -Noun Process | By verb and noun | Get-Process cmdlet | Shows details of Get-Process cmdlet |
| 4 | Get-Command -Verb Get -Noun Item | By verb and noun | Get-Item cmdlet | Shows details of Get-Item cmdlet |
| 5 | Get-Command UnknownCommand | Exact name | No match | Error or no output |
| 6 | End | - | - | No more commands to find |
| Variable | Start | After 1 | After 2 | After 3 | Final |
|---|---|---|---|---|---|
| InputCommand | null | Get-Process | Get-Item | Verb=Get, Noun=Process | Verb=Get, Noun=Item |
| MatchFound | false | true | true | true | false |
| Output | empty | Get-Process details | Get-Item details | Get-Process details | Error or no output |
Get-Command finds commands by name, verb, or noun. Syntax examples: Get-Command Name Get-Command -Verb Get -Noun Process It helps discover available commands and their details. If no match, it shows an error or no output.