Cmdlets
Cheat sheet · https://pcornel.dk/topic.php?topic=3039
Answer
A cmdlet is a compiled or script-based PowerShell command designed to participate in PowerShell parameter binding and object pipelines. Cmdlets normally use approved Verb-Noun names and expose metadata such as parameters, parameter sets and pipeline-input capabilities.
Remember
- Cmdlet names identify intent, but the module/source still matters.
- Parameter sets define valid combinations; a parameter can be mandatory only in specific sets.
- Pipeline binding can occur by value or by property name depending on command metadata.
- Common parameters are provided by advanced functions/cmdlets through the PowerShell runtime.
-WhatIfdescribes intended ShouldProcess actions; it is not a universal simulator of every external side effect.
First checks
$PSVersionTable— PowerShell edition and versionGet-Command <name>— which cmdlet/function/exe runsGet-Help <cmdlet> -Full— syntax and parametersGet-ExecutionPolicy -List— execution policy per scope
Verify in this order
cmdlet name resolved → parameters bound → runs → objects returned
Where it usually breaks
First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.
PowerShell → Cmdlets reference map
| Item | Meaning | Evidence boundary |
|---|---|---|
| Verb-Noun | Naming convention | name does not prove module/source |
| Parameter set | Valid parameter combination | binding failure can occur before action |
| Pipeline input | By value/property name | successful binding does not prove data correctness |
| ShouldProcess | Change-confirmation contract | WhatIf is limited to implemented actions |
| Output object | Structured result | returned object may be request/result, not final target state |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3039