← Knowledge Base
PowerShellReference note1 min read · updated 2026-11-27

PowerShell pipeline: objects, not text

Select, filter, sort and format objects with Where-Object, Select-Object and friends.

powershellpipelineobjects
Get-Process | Where-Object CPU -gt 100 | Sort-Object CPU -Descending | Select-Object -First 5 Name,CPU,Id
Get-Service | Where-Object { $_.Status -eq 'Running' -and $_.Name -like 'w*' }
Get-ChildItem C:\Logs -Recurse -Filter *.log | Measure-Object Length -Sum
Get-Process | Group-Object Company | Sort-Object Count -Descending | Select -First 5
Get-Content app.log | Select-String 'error' | Select -Last 20
Get-Process | Export-Csv procs.csv -NoTypeInformation
Get-Help Get-Process -Examples
Get-Command *service*            # discover commands
Get-Process | Get-Member         # see an object's properties

Commands pass objects with properties, so you filter by property (CPU -gt 100) instead of cutting text. Aliases such as ?, %, ls are fine interactively; write full names in scripts.