Why should formatting usually be late in a pipeline?
Documentation: Microsoft Learn
Format-* cmdlets destroy objects — test why formatting belongs at the end of a pipeline.
An example to inspect
Preview the example. Sign in for the full lesson and activities.
Get-ProcessOverview
QUIZ
Core PowerShell · Question 6 of 12
Explanation
Because Format-* commands are for presentation; filtering and shaping should operate on the original objects.
Apply the reasoning
Formatting emits presentation records rather than preserving the original service or process objects. Filter the original properties first, sort the values you care about, and choose the output fields before using Format-Table for display.
Why the other choices fail
Formatting before every filter changes the input type. Sorting rendered rows sorts presentation data rather than the original numeric properties. The pipeline already accepts objects; formatting is not a prerequisite. Use Export-Csv on the original selected objects when another program needs the report.
Inspect a sample
Show reference output
Review the prerequisite
Read this first:
Primary documentation
Choose your answer
Choose one answer to see feedback.