Pcornel
Windows · PowerShell

Pipeline

Cheat sheet · https://pcornel.dk/topic.php?topic=3041

Back to the Topic

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 version
  • Get-Command <name> — which cmdlet/function/exe runs
  • Get-Help <cmdlet> -Full — syntax and parameters
  • Get-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

ItemMeaningEvidence boundary
ProducerEmits success objectsemission does not prove downstream use
BindingMaps input to parametercompatible shape does not prove correct meaning
StreamingIncremental processingsome commands still buffer/collect
FormattingPresentation stagechanges pipeline object contract
Native processText/process boundaryrequires 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

Confirmation

Confirm action

Continue?