Como usar: PowerShell Cheat Sheet
- Type your own values (folder, file, host) in the boxes at the top — every example on the page updates instantly.
- Search or jump to a section to find the command you need.
- Click Copy to copy a ready-to-run line, or Copy section for a commented block.
- Commands marked destructive delete or overwrite data — read the note before running them.
Objects, not text
The big difference from Bash and CMD: PowerShell commands pass objects down the pipeline, not lines of text. Get-Process | Where-Object CPU -gt 100 | Sort-Object CPU filters and sorts on real properties — no parsing of columns. Get-Member shows what properties an object has, and Select-Object, Where-Object and ForEach-Object do the rest.
Verb-Noun names and aliases
Cmdlets are named Verb-Noun — Get-ChildItem, Set-Content, Remove-Item — so Get-Command -Verb Get or Get-Command *Service* finds what you need. Familiar aliases such as ls, cd, cat and rm map to these cmdlets, but their parameters are PowerShell’s, not Unix flags.
Windows PowerShell 5.1 vs PowerShell 7
Windows ships with Windows PowerShell 5.1 (powershell.exe). PowerShell 7 (pwsh) is the cross-platform successor for Windows, macOS and Linux, with the && and || operators, ternaries and better performance. Everything on this page works in both unless noted. Compare with the CMD cheat sheet and the Linux commands cheat sheet.
Também pesquisado como: powershell commands, powershell commands list, powershell grep, powershell tail, powershell examples, windows powershell commands.
Ferramentas que combinam com: PowerShell Cheat Sheet
- Git Cheat Sheet — Every Git command you use day to day — and the ones you need when something goes wrong — explained in one line.
- Windows Path Converter — Paste a path in any format — C:\Users\me\project, /mnt/c/Users/me/project, /c/Users/me — and get it in every other form, ready to copy: WSL, Git Bash, Cygwin, file URL, UNC and escaped for code.
- Line Ending Converter — See which line endings a file uses and convert them — Windows CRLF to Unix LF or back — for pasted text or a whole batch of files, with trailing-space and tab cleanup on the side.
- Docker Cheat Sheet — The Docker and Docker Compose commands you reach for every week, explained in one line.
Perguntas frequentes
What is the PowerShell equivalent of grep?
Select-String. For example Select-String -Path *.log -Pattern "error", or pipe output into it: Get-Content app.log | Select-String error.How do I follow a log file like tail -f?
Get-Content app.log -Tail 50 -Wait shows the last 50 lines and keeps printing new ones.Why won’t my script run?
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser to allow your own scripts.