PowerShell is the command-line shell and scripting language built into every copy of Windows 11, and it has quietly replaced Command Prompt as the default option in Windows Terminal. Unlike CMD, PowerShell commands (called cmdlets) return structured objects instead of plain text, so the output of one command can be filtered, sorted, or piped directly into another without any text parsing in between.
Every cmdlet follows a strict Verb-Noun naming pattern, such as Get-Process or Stop-Service. Once that pattern clicks, most cmdlet names become guessable on sight, which is one reason PowerShell is easier to pick up than it looks.
Essential PowerShell Commands for Windows
1. Get-Help
Get-Help is the built-in manual for every cmdlet on the system, so it’s the first command worth learning before any other. Running it with a cmdlet name pulls up a full syntax breakdown, and adding -Examples swaps that out for real usage examples instead of a wall of parameter definitions. The first time you use it, PowerShell offers to run Update-Help, which downloads current help files instead of the older ones bundled with Windows.
Syntax:
powershell
Get-Help <cmdlet-name> [-Examples] [-Detailed] [-Online]
Example use cases:
Get-Help Get-Process -Examplesshows real usage patterns for Get-Process.Get-Help Get-Service -Onlineopens the current Microsoft Learn page for that cmdlet in your browser.Update-Helprefreshes the local help files so the answers stay current.
2. Get-Command
Get-Command solves a different problem than Get-Help: it finds the right cmdlet when you know the task but not its exact name. Because every cmdlet follows the Verb-Noun pattern, searching by verb or noun narrows results instantly instead of guessing at names.
Syntax:
powershell
Get-Command [-Verb <verb>] [-Noun <noun>]
Example use cases:
Get-Command -Noun Servicelists every cmdlet that touches Windows services.Get-Command -Verb Restartlists every cmdlet that can restart something.Get-Command -Module Microsoft.PowerShell.Managementlists everything in one specific module.
3. Get-ChildItem
Get-ChildItem lists the files and folders in a location, and it’s the cmdlet running underneath the familiar dir and ls aliases. It’s genuinely more capable than either alias alone, since it returns real file objects with properties like Length, LastWriteTime, and FullName that can be filtered or piped into another command.
Syntax:
powershell
Get-ChildItem [-Path <path>] [-Recurse] [-Filter <pattern>]
Example use cases:
Get-ChildItem -Path C:\Users -Recurse -Filter *.logfinds every log file in every subfolder.Get-ChildItem | Sort-Object Length -Descendinglists files in the current folder by size, largest first.Get-ChildItem -Hiddenreveals hidden files a normaldirwould skip.
4. Set-Location
Set-Location changes the current working directory and is aliased to the familiar cd. One difference from other shells is worth knowing: PowerShell has no direct cd - shortcut to jump back to the previous folder. Instead, it tracks directory history through Push-Location and Pop-Location, which is a cleaner habit to build than retyping long paths.
Syntax:
powershell
Set-Location -Path <path>
Example use cases:
Set-Location C:\Windows\System32jumps straight to a specific folder.Push-Location C:\Tempsaves the current folder before moving, soPop-Locationcan return to it later.Set-Location ~returns to the current user’s home folder.
5. Copy-Item
Copy-Item replaces the old copy and xcopy commands for duplicating files and folders. It supports -Recurse for copying entire folder trees, and -WhatIf, a parameter that previews exactly what would happen without actually copying anything.
Syntax:
powershell
Copy-Item -Path <source> -Destination <destination> [-Recurse] [-WhatIf]
Example use cases:
Copy-Item C:\Reports -Destination D:\Backup -Recursecopies an entire folder and its contents.Copy-Item *.docx -Destination D:\Archivecopies every Word document in the current folder.Copy-Item report.xlsx -Destination report-backup.xlsxduplicates a single file under a new name.
6. Remove-Item
Remove-Item deletes files and folders, replacing del and rmdir. The same -WhatIf parameter that helps with Copy-Item is worth using here every time, since it shows exactly what would be deleted before anything actually happens, which matters most with -Recurse on a folder full of files.
Syntax:
powershell
Remove-Item -Path <path> [-Recurse] [-Force] [-WhatIf]
Example use cases:
Remove-Item C:\Temp\OldLogs -Recurse -WhatIfpreviews a folder deletion before committing to it.Remove-Item *.tmpclears every temporary file in the current folder.Remove-Item C:\Temp\OldLogs -Recurse -Forcedeletes the folder for real, including read-only files.
7. Get-Process
Get-Process lists every process currently running on the machine, with CPU and memory usage attached as real numbers rather than formatted text. That makes it useful for spotting exactly what’s eating resources, and pairing it with Stop-Process turns diagnosis into a fix in the same line, without hunting through Task Manager’s process tree.
Syntax:
powershell
Get-Process [-Name <process-name>]
Example use cases:
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5shows the five biggest CPU consumers right now.Stop-Process -Name "chrome" -Forcecloses every running instance of a hung app by name.Get-Process | Where-Object {$_.WorkingSet -gt 500MB}finds every process using more than 500 MB of memory.
8. Get-Service
Get-Service checks the status of Windows services, the background processes that keep printing, networking, and countless system functions running without a visible window. It’s the fastest way to spot a service that should be running but isn’t, which is often the real cause behind a printer or Wi-Fi issue that never shows an obvious error.
Syntax:
powershell
Get-Service [-Name <service-name>]
Example use cases:
Get-Service | Where-Object {$_.Status -eq "Stopped" -and $_.StartType -eq "Automatic"}surfaces services that should be running but aren’t.Restart-Service -Name "Spooler"restarts the print spooler when printing stops working.Get-Service -Name "wuauserv"checks the status of the Windows Update service specifically.
9. Get-Content
Get-Content reads a file’s contents directly into the console, without needing to open it in another program. Its most useful trick is combining -Tail with -Wait, which streams new lines from a file as they’re written, the same live log-tailing behavior as tail -f on Linux, built into Windows with no extra install.
Syntax:
powershell
Get-Content -Path <path> [-Tail <n>] [-Wait]
Example use cases:
Get-Content -Path C:\Logs\app.log -Tail 20 -Waitstreams a log file live as new lines are written.Get-Content C:\Config\settings.jsonreads a config file straight into the console.Get-Content list.txt | Measure-Object -Linecounts the lines in a text file.
10. Select-String
Select-String is PowerShell’s answer to grep, searching one or more files for a text pattern and returning the matching lines with their line numbers. Chained after Get-ChildItem with the pipe operator, it can search an entire folder tree for one keyword in a single line, something that would otherwise mean opening files one by one.
Syntax:
powershell
Select-String -Path <path> -Pattern <text>
Example use cases:
Select-String -Path C:\Logs\*.log -Pattern "ERROR"finds every error line across every log file in a folder.Get-ChildItem -Recurse -Filter *.txt | Select-String -Pattern "TODO"searches an entire folder tree for a keyword.Select-String -Path notes.txt -Pattern "budget" -CaseSensitiveruns a case-sensitive search inside one file.
If you already rely on Linux tools like grep and tail through the Windows Subsystem for Linux, PowerShell now covers a good chunk of that same ground natively. TechNerdiness’s guide to installing and using WSL on Windows 11 covers the cases where the full Linux environment is still the better choice.
11. Test-NetConnection
Test-NetConnection diagnoses network and connectivity issues in a single command, replacing the old habit of running ping and telnet separately to check whether a specific port is open. Adding -TraceRoute layers a full route trace on top, showing every hop between your machine and the destination.
Syntax:
powershell
Test-NetConnection -ComputerName <host> [-Port <port>] [-TraceRoute]
Example use cases:
Test-NetConnection google.com -Port 443confirms a host is reachable and that a specific port accepts a connection.Test-NetConnection -ComputerName printserver01 -CommonTCPPort SMBchecks whether a common service port is open.Test-NetConnection google.com -TraceRoutemaps every network hop to a destination.
12. Get-ExecutionPolicy / Set-ExecutionPolicy
Get-ExecutionPolicy explains a rule that trips up nearly every PowerShell beginner: why a downloaded script fails with an error about not being digitally signed. The default policy on Windows client machines is Restricted, which blocks all script execution as a safety default, not just scripts from untrusted sources. Set-ExecutionPolicy adjusts that rule, and scoping the change to CurrentUser avoids loosening it for the whole machine or requiring administrator rights.
Syntax:
powershell
Get-ExecutionPolicy [-List]
Set-ExecutionPolicy -ExecutionPolicy <policy> -Scope <scope>
Example use cases:
Get-ExecutionPolicy -Listshows the active policy at every scope, from process to machine-wide.Set-ExecutionPolicy RemoteSigned -Scope CurrentUserallows your own scripts to run while still requiring downloaded scripts to be signed.Unblock-File -Path script.ps1clears the “downloaded from the internet” flag on a single trusted script without changing the policy at all.
You Should Also Learn Windows Subsystem for Linux
PowerShell covers most day-to-day tasks natively, including several jobs, like log tailing and text searching, that used to mean reaching for Linux tools. But some workflows still call for the real thing. TechNerdiness’s guide on Windows Subsystem for Linux walks through installing WSL on Windows 11 and when it’s worth running a full Linux environment alongside PowerShell rather than replacing it.


