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-NounGet-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:

Get-Verb | Select-Object Verb, Group | Sort-Object Group # Verb Group # ---- ----- # Get Common # Set Common # New Common # Remove Common # Start Lifecycle # Stop Lifecycle # Add Common # Clear Common # ... (about 100 approved verbs total, grouped by intent)

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 conventionConsequence
cmd.exeShort, often abbreviated, no shared pattern (dir, copy, del, ren)Nothing to guess from — every command name has to be individually memorized
BashIndependent 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
PowerShellVerb-Noun, verb drawn from a fixed approved list, enforced across every moduleA 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":

# Every cmdlet that operates on something process-related Get-Command -Noun Process* # Every "Get" cmdlet related to services — a search by both verb and noun Get-Command -Verb Get -Noun *Service* # CommandType Name Version Source # ----------- ---- ------- ------ # Cmdlet Get-Service 3.1.0.0 Microsoft.PowerShell.Management

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:

# Just the worked examples — usually the fastest way to relearn a cmdlet you've used before Get-Help Get-Service -Examples # The complete reference: every parameter, every note, every example Get-Help Get-Service -Full # Opens the live, always-current Microsoft Docs page in your browser Get-Help Get-Service -Online

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:

Get-Process | Get-Member -MemberType Property # TypeName: System.Diagnostics.Process # # Name Definition # ---- ---------- # CPU double CPU {get;} # Id int Id {get;} # ProcessName string ProcessName {get;} # WorkingSet long WorkingSet {get;} # ... (dozens more)

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.

The central fact this chapter is built on
You don't need to memorize hundreds of cmdlets or thousands of object properties. You need to memorize three commandsGet-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.
A first practical habit
Whenever a chapter (in this course or anywhere else) shows a property you haven't seen before — like 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.
A plausible-sounding guess still isn't a real cmdlet
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

Exercise 1

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.

📄 View solution
Exercise 2

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?

📄 View solution
Exercise 3

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).

📄 View solution

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/-Module when you don't remember the exact name
  • Get-Help <cmdlet> -Examples / -Full / -Online — the built-in manual, including worked examples
  • Update-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