A PowerShell commands cheat sheet is a quick reference for the cmdlets you use to work with files, processes, services, networks, JSON and CSV data, scripts, modules and remote machines. Search 100 commands by cmdlet, alias, Bash name or task, see the Bash equivalent, copy a working example and spot the ones that delete data before you run them. Nothing here runs on your machine.
Showing 100 of 100 commands
Help & discovery
Get-Help
Show help for any cmdlet, including working examples.
Careful: Deleted items skip the Recycle Bin. Remove-Item -Recurse -Force removes whole folders, hidden and read-only files included, with no undo. Run it with -WhatIf first.
Get-Content
Read a file line by line, or follow a log as it grows.
Comparison operators. PowerShell does not use == or >; they are -eq, -ne, -gt, -lt, -like (wildcards) and -match (regex). All ignore case unless you use -ceq, -clike or -cmatch.
Show the policy that decides whether scripts can run, for each scope.
Syntax: Get-ExecutionPolicy [-List] [-Scope s]
-List
every scope at once
PS> Get-ExecutionPolicy -List
Set-ExecutionPolicy
Allow scripts to run. RemoteSigned for CurrentUser lets your own scripts run while downloaded ones must be signed. Fixes "running scripts is disabled on this system".
Careful: Lowers script protection for that scope. Unrestricted or Bypass runs any script, downloaded ones included. Prefer RemoteSigned for CurrentUser.
Unblock-File
Remove the "downloaded from the internet" mark so RemoteSigned lets a script run.
Syntax: Unblock-File <path>
PS> Unblock-File .\install.ps1
Careful: Only unblock scripts from a source you trust and have read.
.\script.ps1
Run a script in the current folder. PowerShell never runs scripts from the current folder by bare name, so the .\ is required.
Syntax: .\<script>.ps1 [arguments]
Bash: ./build.sh
PS> .\build.ps1 -Configuration Release
. .\script.ps1
Dot-source a script: run it in the current scope so its functions and variables stay defined. Use it to reload your profile.
Syntax: . <path>
Bash: source ~/.bashrc
PS> . $PROFILE
pwsh -File
Run a script in a new PowerShell process. pwsh is PowerShell 7; powershell.exe is Windows PowerShell 5.1.
List local user accounts and whether they are enabled.
Syntax: Get-LocalUser [-Name n]
Bash: cut -d: -f1 /etc/passwd
PS> Get-LocalUser
Start-Transcript
Record everything in this session to a log file until Stop-Transcript.
Syntax: Start-Transcript [-Path p] [-Append]
Bash: script session.log
-Append
add to an existing log
PS> Start-Transcript -Path .\session.log
Verb-Noun: how PowerShell commands are named
Every cmdlet is an approved verb plus a noun: Get-Service reads services, Stop-Service stops one and Set-Service changes one. Once you know the noun, Get-Command -Noun Service lists every command for it. Cmdlets pass objects, not text, so you filter with Where-Object and pick fields with Select-Object instead of grep and cut. Parameter names can be shortened while they stay unique, and tab completion fills them in.
How to use this PowerShell command list
1. Search by cmdlet, alias or task
Type a cmdlet such as Get-Process, an alias such as ls, a Bash command such as grep, or a task such as port or zip.
2. Filter by category
Pick a category such as Files & folders or Networking to narrow the list.
3. Check the alias, Bash equivalent and syntax
See the short alias, the closest Bash command and the parameters people actually use. Read any Careful note.
4. Copy the example
Copy the example, change the names and paths to yours and run it in PowerShell. Add -WhatIf first on anything that changes files.
PowerShell commands FAQ
What are the most useful PowerShell commands?
Start with Get-Help, Get-Command and Get-Member to discover anything else. Then Get-ChildItem, Set-Location, Copy-Item, Remove-Item and Get-Content for files, Get-Process and Get-Service for what is running, and Where-Object, Select-Object and Sort-Object to filter output.
What is the PowerShell equivalent of ls, grep and cat?
ls is Get-ChildItem, grep is Select-String, cat is Get-Content, ps is Get-Process, kill is Stop-Process and curl is Invoke-WebRequest. On Windows, PowerShell defines ls, cat, ps and kill as aliases, so the Linux names often work.
Why do ls and cat not work in PowerShell on Linux or macOS?
PowerShell 7 removes aliases such as ls, cat, ps, kill, sort and curl on Linux and macOS so the native programs run instead. Use the full cmdlet names, such as Get-ChildItem, in scripts that must run everywhere.
How do I fix "running scripts is disabled on this system"?
Run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser. Your own scripts can then run while downloaded scripts must be signed or unblocked with Unblock-File. Avoid Unrestricted and Bypass, which allow any script.
What is the difference between PowerShell and Command Prompt?
Command Prompt (cmd.exe) passes plain text between commands. PowerShell passes objects with properties, so you can filter with Where-Object and pick fields with Select-Object instead of parsing text. Most cmd commands, like ipconfig and ping, still work inside PowerShell.
Which PowerShell commands are dangerous?
Remove-Item -Recurse -Force deletes folders with no undo, Stop-Process ends programs without saving, Set-ExecutionPolicy Bypass lets any script run, and irm <url> | iex runs downloaded code unseen. Add -WhatIf to see what a command would do first.
Automate the PowerShell steps you repeat
Running the same build, test and deploy commands by hand on Windows? Tornic turns those steps into deterministic multi-step workflows that run on the Claude Code, Codex or Cursor CLI you already pay for.