Green YGreck Guides FR
🪟 WindowsIntermediate⏱ 20 min5 steps

First steps with PowerShell

The five commands to know to explore and filter your system.

  1. Find a command and read its help:
    Get-Command *process*
    Get-Help Get-Process -Examples
  2. List files:
    Get-ChildItem C:\Users -Recurse -Filter *.pdf
  3. 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
  4. Export a result to a file:
    Get-Service | Where-Object Status -eq Running | Export-Csv services.csv -NoTypeInformation
  5. PowerShell handles objects, not text: each column is a property you can filter.