First steps with PowerShell
The five commands to know to explore and filter your system.
- Find a command and read its help:
Get-Command *process* Get-Help Get-Process -Examples
- List files:
Get-ChildItem C:\Users -Recurse -Filter *.pdf
- Chain with the pipeline: filter, sort, pick columns:
Get-Process | Where-Object CPU -gt 100 | Sort-Object CPU -Descending | Select-Object Name, CPU -First 5
- Export a result to a file:
Get-Service | Where-Object Status -eq Running | Export-Csv services.csv -NoTypeInformation
- PowerShell handles objects, not text: each column is a property you can filter.