A cmdlet (pronounced "command-let") is a lightweight, specialized command built into PowerShell that performs a single specific function. Unlike traditional CLI executables, cmdlets are compiled .NET classes that emit structured objects into the pipeline.
The Verb-Noun Naming Convention
Every cmdlet follows a strict Verb-Noun syntax:
- Verbs are standardized: The verb describes the action being performed (for example:
Get,Set,New,Remove,Start,Stop,Import,Export, etc.), they are the same across all cmdlets. - Nouns are specific: The noun identifies the resource or target being operated on (for example:
Process,Service,Item,Content).
Get-VerbVerb Group
---- -----
Add Common
Clear Common
Close Common
Copy Common
Enter Common
...Discovering Commands and Help
Three cmdlets form the foundation for self-discovery in PowerShell: you rarely need to leave the shell to learn how something works.
Get-Help
Displays detailed documentation for any cmdlet, including syntax, parameters, and examples.
Get-Help Get-Process -Exampleswhere:
Get-Helpretrieves documentation for the specified cmdlet.-Exampleslimits the output to usage examples only.
NAME
Get-Process
EXAMPLE
Get-Process -Name "powershell"
Gets information about the powershell process.Get-Command
Searches for available cmdlets, functions, and aliases, optionally filtered by name or noun.
Get-Command -Noun ServiceCommandType Name Version Source
----------- ---- ------- ------
Cmdlet Get-Service 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet New-Service 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet Restart-Service 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet Resume-Service 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet Set-Service 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet Start-Service 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet Stop-Service 3.1.0.0 Microsoft.PowerShell.Management
Cmdlet Suspend-Service 3.1.0.0 Microsoft.PowerShell.ManagementGet-Member
Reveals the properties and methods available on any object, which is essential for exploring PowerShell's object-based pipeline.
Get-Process | Get-Member TypeName: System.Diagnostics.Process
Name MemberType Definition
---- ---------- ----------
Kill Method void Kill()
Refresh Method void Refresh()
CPU Property double CPU {get;}
Id Property int Id {get;}
ProcessName Property string ProcessName {get;}
...Core Cmdlets for Everyday Use
Get-Process, Get-Service, Get-Item
These three Get-* cmdlets retrieve information about running processes, system services, and filesystem/registry items respectively.
Get-Process -Name "explorer"
Get-Service -Name "Spooler"
Get-Item -Path "C:\Windows" NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
124 104.28 296.90 69.47 3636 1 explorer
Status : Running
Name : Spooler
DisplayName : Print Spooler
PSPath : Microsoft.PowerShell.Core\FileSystem::C:\Windows
PSParentPath : Microsoft.PowerShell.Core\FileSystem::C:\
PSChildName : Windows
PSDrive : C
PSProvider : Microsoft.PowerShell.Core\FileSystem
PSIsContainer : True
Name : Windows
Parent : C:\
Root : C:\
Exists : True
FullName : C:\Windows
Extension :
CreationTime : 12/7/2019 10:03:44 AM
CreationTimeUtc : 12/7/2019 9:03:44 AM
LastAccessTime : 9/27/2026 9:01:53 PM
LastAccessTimeUtc : 9/27/2026 7:01:53 PM
LastWriteTime : 9/27/2026 5:37:49 PM
LastWriteTimeUtc : 9/27/2026 3:37:49 PM
LinkTarget :
UnixFileMode : -1
Attributes : Directory
Mode : d----
ModeWithoutHardLink : d----
BaseName : Windows
ResolvedTarget : C:\Windows
Target :
LinkType :Where-Object, Select-Object, Sort-Object
These cmdlets filter, shape, and order pipeline data and are used constantly together.
Get-Process | Where-Object { $_.CPU -gt 10 } | Select-Object Name, CPU | Sort-Object CPU -Descendingwhere:
Where-Objectfilters objects based on a condition ($_.CPU -gt 10).Select-Objectpicks only the specified properties (Name,CPU).Sort-Object -Descendingorders the results from highest to lowestCPU.
Name CPU
---- ---
explorer 69.80
WindowsTerminal 21.62
SearchApp 17.88
RuntimeBroker 13.17
...ForEach-Object, Format-Table, Format-List
ForEach-Object runs a script block against each item in the pipeline, while Format-Table and Format-List control how output is displayed.
Get-Service | ForEach-Object { "$($_.Name) is $($_.Status)" }Spooler is Running
BITS is Running
Fax is StoppedGet-Process | Select-Object -First 3 | Format-List Name, Id, CPUwhere:
Format-Listdisplays each object's properties vertically, one per line. This is useful when there are many properties or long values.Format-Table(the default for most output) displays properties in columns, which is better suited for scanning many objects at once.
Name : pwsh
Id : 9124
CPU : 18.22
Name : chrome
Id : 5544
CPU : 45.67Cheat Sheet: Top 20 Cmdlets
| Cmdlet | Purpose |
|---|---|
Get-Help |
Displays help documentation for a cmdlet |
Get-Command |
Lists available commands and cmdlets |
Get-Member |
Shows an object's properties and methods |
Get-Process |
Lists running processes |
Get-Service |
Lists system services |
Get-Item |
Retrieves a file, folder, or registry item |
Get-ChildItem |
Lists contents of a directory or container |
Get-Content |
Reads content from a file |
Set-Content |
Writes content to a file |
Where-Object |
Filters objects based on a condition |
Select-Object |
Selects specific properties or a subset of objects |
Sort-Object |
Sorts objects by property |
ForEach-Object |
Executes a script block for each pipeline object |
Format-Table |
Formats output as a table |
Format-List |
Formats output as a vertical list |
New-Item |
Creates a new file, folder, or registry key |
Remove-Item |
Deletes a file, folder, or registry key |
Copy-Item |
Copies files or folders |
Start-Process |
Launches an application or script |
Stop-Process |
Terminates a running process |