PowerShell Genie

Build a PowerShell pipeline and inspect every stage

Guide 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn

Build a pipeline, then step through it. The inspector uses a fixed fictional dataset so every stage is visible and repeatable.

Mental model

Objects move left to right

The pipe passes objects, not formatted text. A filter removes objects, a sort reorders them, and Select-Object can trim or reshape the result.

Interactive pipeline inspector

See the input and output at every stage

Change the controls, then use Step or Play. Rows that fail the current pipeline fade on the left; returned objects stay highlighted on the right.

1 · Sourceobjects enter
2 · Filtertest objects
3 · Sortchange order
4 · Selectkeep first rows

Before · source objects

After · returned objects

1$objects = source command
2$objects = $objects | Where-Object ...
3$objects = $objects | Sort-Object ...
4$result = $objects | Select-Object -First ...

Live values

$objects.Count
0
after filter
—
sort property
—

Genie: press Step to inspect one stage, or Play to watch the whole pipeline.

What to notice

  • Filtering changes membership: some objects disappear.
  • Sorting changes order: the same objects can move without losing their properties.
  • Display is not the object: a table shows selected properties; the object can carry more.
  • Format last: keep real objects until you actually need human-facing text.

Open Object Explorer to see the properties a displayed row hides.

Next lesson
Genie guideBuild a PowerShell pipeline and inspect every stage

Build a pipeline, then step through it. The inspector uses a fixed fictional dataset so every stage is visible and repeatable.