Pipeline
Cheat sheet · https://pcornel.dk/topic.php?topic=3041
Answer
The PowerShell pipeline connects commands by passing success-stream objects to downstream commands. The receiving command binds those objects to parameters according to metadata, typically by value or property name, while other PowerShell streams follow separate routing rules.
Remember
- The PowerShell pipeline is primarily object-based, not line-based text piping.
- Only the success output stream is pipeline data by default; other streams have separate semantics.
- Commands may stream objects one at a time or buffer/collect before producing results.
- Formatting should normally be the final presentation step.
- Native executables introduce text/exit-code boundaries that differ from PowerShell cmdlets.
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
first command emits objects one by one → bound to the next cmdlet's parameters → … → output
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 → Pipeline reference map
| Item | Meaning | Evidence boundary |
|---|---|---|
| Producer | Emits success objects | emission does not prove downstream use |
| Binding | Maps input to parameter | compatible shape does not prove correct meaning |
| Streaming | Incremental processing | some commands still buffer/collect |
| Formatting | Presentation stage | changes pipeline object contract |
| Native process | Text/process boundary | requires exit-code/stdout/stderr interpretation |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3041