Skip to content
CareerBridge
← PowerShell: read, inspect and report
GUIDED STARTER LESSON

Select useful properties

Recognise that PowerShell passes objects through a pipeline.

Understand the idea

Get-Process returns process objects. Each has properties such as Id and ProcessName.

The pipeline character | sends output to the next command. Select-Object chooses properties or limits the number of results.

Process details vary between devices. Use sanitised or invented examples in a public portfolio.

Worked example

The command displays the names and IDs of up to five processes. It does not terminate them.

Get-Process | Select-Object -First 5 -Property Id, ProcessName