Cheatography
https://cheatography.com
Key PowerShell cmdlets for Windows administration: files, processes, services, networking, and Active Directory basics — with practical examples. Built for Windows admins and certification study. More free study resources at bytebarhq.com.
The Pattern
Every cmdlet is Verb-Noun |
Get-Process
, Stop-Service
, New-Item
|
Learn the verbs — they work across every noun.
Must-Know Aliases
Aliases are shortcuts — use full cmdlet names in scripts.
Files & System
Get-ChildItem -Recurse -Filter *.log
|
find files |
Get-Content log.txt -Tail 20 -Wait
|
live tail |
Copy-Item src dst -Recurse
|
copy folders |
Get-Help Get-Process -Examples
|
built-in examples |
|
discover cmdlets |
Get-Help
and Get-Command
are your built-in documentation.
Processes & Services
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5
|
top 5 CPU hogs |
Stop-Process -Name notepad -Force
|
kill a process |
Get-Service | Where-Object {$_.Status -eq 'Running'}
|
running services |
Restart-Service -Name Spooler
|
restart a service |
The pipe |
passes objects, not text.
Networking
Test-Connection 8.8.8.8 -Count 4
|
ping |
Test-NetConnection example.com -Port 443
|
port check |
|
IP config |
Get-DnsClientCache | Clear-DnsClientCache
|
flush DNS |
Resolve-DnsName example.com
|
nslookup equivalent |
Test-NetConnection
covers ping, port checks, and traceroute in one cmdlet.
Active Directory
Get-ADUser -Filter * -SearchBase "OU=Sales,DC=corp,DC=local"
|
all users in an OU |
Get-ADUser jdoe | Unlock-ADAccount
|
unlock an account |
Set-ADAccountPassword jdoe -Reset
|
force a password reset |
Get-ADComputer -Filter * | Select-Object Name,OperatingSystem
|
inventory computers |
Requires the ActiveDirectory module (RSAT).
Pipeline Power
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 Name
|
top 5 CPU hogs, names only |
Get-ChildItem C:\ -Recurse -ErrorAction SilentlyContinue | Where-Object {$_.Length -gt 100MB} | Sort-Object Length -Descending
|
find large files |
Chain small cmdlets — the pipeline does the heavy lifting.
Quick Hits
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
|
unblock scripts |
Cmdlets output objects, not text |
pipe freely |
|
current object in the pipeline |
When in doubt, pipe to Get-Member
to see what's inside.
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by bytebar