Command Reference
PowerShell Commands
Complete PowerShell command reference with syntax, examples, parameters and safer alternatives — free and searchable.
All categories
Navigation
Files & Folders
Search
Processes
Networking
System
Permissions
Packages
Git
Docker
Environment
42 commands
- PSNavigation
Print working directory
Get-Location - PSNavigation
Change directory
Set-Location {path} - PSFiles & Folders
List files
Get-ChildItem {path} - PSFiles & Folders
Create folder
New-Item -ItemType Directory {name} - PSFiles & Folders
Copy files
Copy-Item {src} {dst} - PSFiles & Folders
Move files
Move-Item {src} {dst} - PSFiles & Folders
Delete safely
Remove-Item {path} -Confirm - PSSearch
Search text in files
Get-ChildItem -Path . -Filter {pattern} -File -Recurse | Select-String -Pattern "{text}" - PSProcesses
List processes
Get-Process {name} - PSProcesses
Kill process
Stop-Process -Name {name} -Confirm - PSNetworking
Show IP / network config
Get-NetIPConfiguration - PSNetworking
Test connectivity
Test-Connection {host} -Count 4 - PSSystem
Disk usage
Get-PSDrive -PSProvider FileSystem - PSPermissions
View permissions
Get-Acl {path} | Format-List - PSEnvironment
Show environment variable
$env:{name} - PSPackages
Install module
Install-Module {name} -Scope CurrentUser - PSSystem
Clear screen
Clear-Host - PSFiles & Folders
Read file contents
Get-Content {path} - PSFiles & Folders
Follow log file
Get-Content {path} -Wait -Tail 20 - PSSearch
Find files by name
Get-ChildItem -Recurse -Filter {pattern} - PSNetworking
Download a file
Invoke-WebRequest {url} -OutFile {dst} - PSNetworking
List listening ports
Get-NetTCPConnection -State Listen - PSNetworking
DNS lookup
Resolve-DnsName {host} - PSNetworking
Trace network route
Test-NetConnection {host} -TraceRoute - PSSystem
System information
Get-ComputerInfo - PSProcesses
CPU & memory usage
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 - PSPermissions
Run as administrator
Start-Process powershell -Verb RunAs - PSSystem
Manage a service
Restart-Service {name} - PSSystem
View system logs
Get-WinEvent -LogName {log} -MaxEvents 20 - PSFiles & Folders
Compress to archive
Compress-Archive -Path {src} -DestinationPath {dst} - PSPackages
Update packages
winget upgrade --all - PSSystem
Print text
Write-Host "{text}" - PSSystem
Command history
Get-History - PSFiles & Folders
Rename a file
Rename-Item {old} {new} - PSFiles & Folders
Create empty file
New-Item -ItemType File {name} - PSFiles & Folders
Show first lines of file
Get-Content {path} -TotalCount 20 - PSSystem
Restart the computer
Restart-Computer - PSSystem
Show current user
whoami - PSSystem
Show folder size
Get-ChildItem {path} -Recurse -File | Measure-Object -Property Length -Sum - PSFiles & Folders
Extract an archive
Expand-Archive {src} -DestinationPath {dst} - PSEnvironment
Locate a command
Get-Command {name} - PSEnvironment
Set environment variable
$env:{name} = "{value}"