Use this when finding and using PowerShell cmdlets.
Cmdlets
Cmdlets are PowerShell's built-in commands named Verb-Noun, such as Get-Service or Set-Item, which output objects. Find them with Get-Command and learn them with Get-Help -Examples.
1. Cmdlets follow Verb-Noun.
2. Discover with Get-Command.
3. Common parameters (-WhatIf, -Confirm, -Verbose, -ErrorAction).
4. Prefer cmdlets over parsing exe output.
5. Check module availability.
Verb-Noun cmdlet → objects
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Use Get-Command <cmdlet> -All, inspect .Source, .Version and .ParameterSets, then use Get-Help <cmdlet> -Full for documented semantics. Test read-only discovery first and, where supported, -WhatIf for mutation scope. After a real change, query the target with an independent read cmdlet/API rather than assuming the cmdlet's return value shows convergence.
Step 2 Common mistakes Narrow the fault
- Using aliases in scripts.
Step 3 Where it fails Narrow the fault
Command discovery success does not show parameter binding will select the intended set, and -WhatIf does not guarantee every underlying provider or external side effect is modeled. A non-terminating error can coexist with useful success output. Separate command identity, parameter binding, execution/error semantics and target-state verification when diagnosing automation.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Cmdlets are named Verb-Noun.
- Get-Command and Get-Help -Examples find and explain them.
- They output objects you can inspect with Get-Member.
Get-Command -Noun Service— find cmdletsGet-Help Get-Service -Examples— examplesGet-Verb— approved verbs
ReferenceWhy it matters1 section · depth on demand
In depth
Cmdlets are PowerShell's built-in commands, implemented in .NET and named Verb-Noun. They take named parameters, accept pipeline input and return objects. Common parameters such as -WhatIf, -Confirm, -Verbose and -ErrorAction work across cmdlets.
Get-Process -Name pwsh | Stop-Process -WhatIf
Get-ChildItem C:\Logs -Filter *.log | Where-Object LastWriteTime -lt (Get-Date).AddDays(-30) | Remove-Item -WhatIf
| Parameter | Effect |
|---|---|
-WhatIf | Show what would happen, change nothing |
-Confirm | Prompt before each change |
-ErrorAction Stop | Turn errors into terminating errors for try/catch |
-Verbose | Extra progress output |
Use -WhatIf first for any bulk change.
ReferenceImportant terms & boundaries2 sections · depth on demand
Known-good, transitional and broken reference
Cmdlets — comparative operational reference for PowerShell Automation → Cmdlets. What it does not show: request acceptance or job success does not show target change, effective state or workload recovery Next check: move one step toward the original workload using Inspect $Error/exception/exit semantics and the returned object, then query the target independently and verify the service/application outcome rather than treating command completion as evidence. Platform/scope: PowerShell 5.1/7+, module versions and remoting endpoint behavior vary by host/platform.
PowerShell mechanics
Cmdlets are commands that participate in PowerShell pipeline and parameter-binding semantics. Their Verb-Noun names are discoverable metadata, but command identity also includes module/source and version because functions, aliases or multiple module versions can shadow the name. A cmdlet exposes one or more parameter sets; binding selects a compatible set based on named, positional and pipeline input plus type conversion and validation.
ReferenceConfiguration & state1 section · depth on demand
Authoring and lifecycle
Automation should resolve cmdlets from expected modules and avoid ambiguous command names. Use module-qualified names when shadowing is possible, review SupportsShouldProcess/-WhatIf behavior before mutation, and treat common parameters such as -ErrorAction as execution policy rather than business outcome. When module versions change, parameter sets and defaults are part of the compatibility surface.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Microsoft Learn documentation reviewed for bounded PowerShell reference claims. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/get-command?view=powershell-7.5 · confidence 94%Quick lookup tables
Cmdlets · PowerShell operational reference
Topic-specific PowerShell runtime identity, persistence, verification, output and failure-boundary lookup.
| Boundary | Cmdlets reference |
|---|---|
| Runtime identity | PowerShell edition/version + command/module source |
| Persistent intent | Script/module/config prerequisites under source control |
| Verification | Read-only discovery → execution evidence → independent target read-back |
| Output contract | Structured objects/streams before formatting |
| Failure boundary | Separate engine/binding from transport/API/native and target-state failures |
Deep reference
Healthy vs suspicious evidence
Output interpretation
A cmdlet may emit zero, one or many objects and can also emit non-terminating errors while the pipeline continues. Inspect actual object types and relevant properties rather than formatted columns. If the cmdlet wraps an asynchronous service or API, an accepted operation can be different from completed target state, so record identifiers and follow the operation to a terminal state.