PowerShell Genie

Why should formatting usually be late in a pipeline?

Quiz 2 min read Windows PowerShell 5.1 and PowerShell 7

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-Process

Overview

QUIZ

Core PowerShell · Question 6 of 12

Inspect a sample

1PS> Get-Process
Show reference output
1 Name ProcessName Id CPU WS
2 ------- ----------- ----- ------ ---------
3 chrome chrome 9184 842.31 486539264
4 notepad notepad 3200 0.4 12582912
5 pwsh pwsh 11268 18.27 78643200
6 spoolsv spoolsv 4400 1.4 33554432
7 MsMpEng MsMpEng 2600 950 220200960

Review the prerequisite

Read this first:

objects versus text

Primary documentation

PowerShell objects and pipelines documentation

Choose your answer

Choose one answer to see feedback.

Next question
Genie guideWhy should formatting usually be late in a pipeline?

Format-* cmdlets destroy objects — test why formatting belongs at the end of a pipeline.