Loading tool…
cheatsheet
Get-ChildItem -Path C:\UsersList items in a directory (ls/dir alias)
Set-Location C:\TempChange current directory (cd alias)
Get-LocationGet current working directory (pwd alias)
New-Item -Path 'C:\Temp\newfile.txt' -ItemType FileCreate a new file
Remove-Item -Path 'C:\Temp\oldfile.txt'Delete a file (rm alias)
Remove-Item -Recurse -Path 'C:\Temp\oldfolder'Delete a folder recursively
Copy-Item -Path 'C:\file.txt' -Destination 'D:\'Copy a file
Move-Item -Path 'C:\oldname.txt' -Destination 'C:\newname.txt'Move/rename a file
Get-Content C:\log.txtDisplay file content (cat alias)
Get-ProcessList running processes (ps alias)
Stop-Process -Name 'notepad'Stop a process by name
Get-ServiceList all Windows services
Restart-Service -Name 'Spooler'Restart a Windows service
Get-WmiObject -Class Win32_OperatingSystem | Select-Object Caption, VersionGet OS info
Get-ComputerInfo -Property OsName, OsVersionGet basic computer info (newer PS versions)
Get-NetIPAddressShow network adapter IP configuration (ipconfig alias)
Test-Connection -ComputerName google.comTest network connectivity (ping alias)
Resolve-DnsName google.comPerform DNS lookup (nslookup alias)
$myVariable = 'Hello'Assign a value to a variable
Write-Host 'Hello, World!'Print output to console
Get-Help Get-ChildItem -FullGet detailed help for a cmdlet
Set-ExecutionPolicy RemoteSignedAllow running local scripts, require remote scripts to be signed
Get new cheatsheets & tools in your inbox
No spam — just new releases, occasionally.