Cmdlet Syntax, Discovery & Help
PowerShell Fundamentals
Chapter 3 · Cmdlet Syntax, Discovery & Help
Every cmdlet used so far — Get-ChildItem, Sort-Object, Where-Object, Get-PSDrive, Get-ItemProperty — has followed the exact same two-word shape: a verb, a dash, a noun. That's not a coincidence, and it's not decoration. It's a deliberate, enforced naming convention, and once you know how it works you can often guess a cmdlet's name correctly before ever looking it up — and when a guess is wrong, three built-in tools (Get-Command, Get-Help, Get-Member) will get you to the right answer faster than a web search.
Verb-Noun: A Naming Convention You Can Actually Rely On
Every real PowerShell cmdlet is named Verb-Noun — Get-Process, Stop-Service, New-Item, Remove-Item. The noun is usually singular and specific to what it operates on; the verb comes from a fixed, curated list Microsoft calls the approved verbs — a deliberately short list, not an open vocabulary:
There is no approved verb called "Delete," "Create," or "Fetch" — which is exactly why a plausible-sounding guess like Delete-Item or Fetch-Process fails outright. The real cmdlets are Remove-Item and Get-Process. This isn't PowerShell being needlessly picky; it's the entire point. Every module — built-in or from any third party — is expected to follow the same approved-verb list, which is what makes a skill like "I can usually guess a cmdlet name" transfer to modules you've never even installed yet.
| Naming convention | Consequence | |
|---|---|---|
| cmd.exe | Short, often abbreviated, no shared pattern (dir, copy, del, ren) | Nothing to guess from — every command name has to be individually memorized |
| Bash | Independent standalone tools, each named by whoever wrote it (ls, grep, awk, sed, curl) | No shared convention at all — a tool's name tells you nothing about what family it belongs to |
| PowerShell | Verb-Noun, verb drawn from a fixed approved list, enforced across every module | A cmdlet's own name usually tells you what it does, and a wrong guess is often just one approved-verb swap away from correct |
Get-Command: Discovering Cmdlets Without Memorizing Them
Get-Command searches every loaded cmdlet by verb, noun, or module — the tool for "I don't remember the exact name, but I know roughly what I want":
Get-Help: Reading the Manual Without Leaving the Shell
Once you know a cmdlet's name, Get-Help is the built-in manual — full syntax, parameter descriptions, and (the genuinely useful part) worked examples:
The help text bundled with PowerShell isn't installed by default on a fresh system — run Update-Help once (as Administrator, since it downloads content) to populate it, or reach for -Online in the meantime.
Get-Member: Asking an Object What It Actually Has
This is the tool that closes the loop on Chapter 1's own object-pipeline claim. Back then, Get-Process | Sort-Object CPU -Descending just used CPU as if it were obviously a valid property to sort by. It wasn't a guess — it's discoverable, and Get-Member is how:
Pipe any object into Get-Member and it lists every real property and method that object actually has — which is also exactly how you'd have discovered Length was a valid property on a file object back in Chapter 2's own Sort-Object Length example, without needing to already know it in advance.
Get-Command to find a cmdlet by what it does, Get-Help to learn exactly how to use one you've found, and Get-Member to see what any object flowing through the pipeline actually offers. That three-command discovery loop works identically against a module you installed five minutes ago as it does against anything built in — which is precisely why it's worth learning now, before Chapter 11 starts introducing modules you haven't seen yet.
CPU or Length above — get in the habit of piping that same command into Get-Member instead of taking the property name on faith. It turns "the lesson used this property" into "I confirmed this property for myself," which is a much sturdier way to actually learn the object pipeline.
Delete-Item, Create-Item, and Fetch-Item all read as reasonable English, and none of them exist — "Delete," "Create," and "Fetch" simply aren't approved verbs. Before assuming a cmdlet you've guessed at is genuinely missing (or worse, silently trying several near-guesses until one happens to run), reach for Get-Command -Verb Get -Noun Item or an equivalent search first — it'll get you to the real name (Remove-Item, New-Item, Get-Item) faster and more reliably than trial and error.
Hands-On Exercises
Explain why Delete-Item produces an error in PowerShell rather than deleting something. Name the actual cmdlet, and name the concept (covered in this chapter) that explains why "Delete" specifically was never a valid choice.
Run Get-Process | Get-Member -MemberType Property (or recall this chapter's own output). Explain how this connects back to Chapter 1's Sort-Object CPU -Descending example — specifically, how would you have confirmed CPU was a valid property to sort by without already knowing it in advance?
You want to find a cmdlet for starting a Windows service, but you don't remember its exact name. Write the Get-Command call you'd use to find it, and explain your search strategy (which parts you searched by verb versus by noun, and why).
Chapter 3 Quick Reference
- Verb-Noun — every cmdlet's name; the verb is drawn from a fixed, enforced approved-verb list (
Get-Verb) Get-Command— discover a cmdlet by-Verb/-Noun/-Modulewhen you don't remember the exact nameGet-Help <cmdlet> -Examples / -Full / -Online— the built-in manual, including worked examplesUpdate-Help— populates local help content on a fresh install (run once, as Administrator)Get-Member— pipe any object into it to see every real property and method it actually has- This chapter's own throughline: memorize the three-command discovery loop (
Get-Command/Get-Help/Get-Member), not the cmdlets themselves - Next chapter: The Pipeline: Passing Objects, Not Text