PowerShell is a command-line shell and scripting language built into Windows 11. The intimidation factor is real — it looks technical, the syntax is unfamiliar, and the perception that a wrong command could break something keeps most users away. In practice: PowerShell is forgiving for beginners because reading information is always safe, most useful commands are straightforward English-like phrases, and the help system is built right in. If you want the full context, see our Complete Guide to Windows 11.
This guide starts from zero and covers the commands and concepts that are genuinely useful day-to-day, without assuming prior command-line experience.
Opening PowerShell
Win+X → “Terminal” or “Windows PowerShell.” On Windows 11, the default terminal is Windows Terminal, and PowerShell is typically the default profile. A blue or dark terminal window with a PS C:UsersYourName> prompt means you’re in PowerShell.
For commands that need administrator privileges: Win+X → “Terminal (Admin)” → User Account Control prompt → confirm. The title bar changes or a yellow border appears depending on your Terminal configuration. Run admin sessions only when a command specifically requires it — most read/query commands work as a standard user.
The three things PowerShell can do
Before any commands: the mental model. PowerShell does three things:
- Get information — read system state, list files, check processes, query settings
- Make changes — modify files, change settings, manage services, install software
- Run scripts — automate sequences of the above, scheduled or on-demand
For beginners: start with #1. Getting information is always safe — you can’t break anything by reading. Once you’re comfortable reading output, #2 follows naturally. Scripts (#3) come when you find yourself typing the same commands repeatedly.
Essential commands for everyday use
| Command | What it does |
Get-Process | Lists all running processes (like Task Manager in text form) |
Get-Service | Lists all Windows services and their status |
Get-ChildItem (or ls / dir) | Lists files and folders in the current directory |
Set-Location C:path (or cd C:path) | Changes the current directory |
Get-Content filename.txt | Displays the contents of a text file |
Copy-Item source destination | Copies a file or folder |
Remove-Item filename | Deletes a file or folder |
Get-Date | Shows current date and time |
whoami | Shows which account you’re running as |
ipconfig | Shows network adapter IP addresses (same as in CMD) |
Notice that PowerShell commands follow a pattern: Verb-Noun. Get-Process, Set-Location, Copy-Item, Remove-Item. Once you understand this pattern, guessing commands becomes easier — if you want to stop a service, try Stop-Service; if you want to start one, try Start-Service. Many guesses work correctly.
Tab completion — the most useful feature for beginners
Start typing any command and press Tab. PowerShell completes the command, file path, or parameter name. Press Tab repeatedly to cycle through options. This reduces typing, prevents typos, and helps discover available options without memorising everything.
Tab completion works for: command names, file and folder paths, parameter names, and even parameter values in many cases. Typing Get-S then Tab cycles through all Get-S* commands. Typing cd C:Us then Tab completes the path. This is the single most important habit for building PowerShell proficiency quickly.
The help system
Get-Help is the built-in documentation command. Use it for any command you want to understand:
Get-Help Get-Process # shows basic help for Get-Process
Get-Help Get-Process -Full # shows complete documentation
Get-Help Get-Process -Examples # shows usage examples onlyFirst time using Get-Help: it may prompt you to download help files. Run Update-Help once (as administrator) to download the complete help documentation. After that: Get-Help works offline for all built-in commands.
Practical PowerShell commands for real tasks
The commands that non-developers actually find useful regularly:
# Find which process is using a lot of CPU (like Task Manager, sorted)
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10
# List all installed applications
Get-Package | Select-Object Name, Version
# Check disk space on all drives
Get-PSDrive -PSProvider FileSystem | Select-Object Name, Used, Free
# Find a file by name anywhere on C: drive
Get-ChildItem -Path C: -Filter "*.pdf" -Recurse -ErrorAction SilentlyContinue
# See what's running at startup
Get-CimInstance -ClassName Win32_StartupCommand | Select-Object Name, Command
# Restart a service (example: Windows Update)
Restart-Service -Name wuauserv
# Download a file from the internet
Invoke-WebRequest -Uri "https://example.com/file.zip" -OutFile "C:downloadsfile.zip"Our guide on Windows Terminal covers configuring the terminal environment where PowerShell runs, and our guide on WSL on Windows 11 covers bash as an alternative shell for Linux-style command-line work. For comprehensive PowerShell documentation including advanced scripting, Microsoft’s PowerShell documentation covers the full language reference, modules, and scripting tutorials.
The pipeline — combining commands
The pipe character (|) passes the output of one command as input to the next. This is how PowerShell becomes more powerful than clicking through menus:
Get-Process | Where-Object {$_.CPU -gt 50} # processes using more than 50 CPU seconds
Get-Service | Where-Object {$_.Status -eq "Stopped"} # only stopped services
Get-ChildItem C: -Recurse | Where-Object {$_.Length -gt 100MB} # files larger than 100MBThe pattern: Get something → filter or sort it → display or export it. Most useful PowerShell one-liners follow this shape. The curly braces ({}) contain filtering conditions; $_ refers to the current item being processed.
Running scripts — execution policy
By default, Windows 11 prevents running PowerShell scripts (.ps1 files) as a security measure. Check the current policy:
Get-ExecutionPolicyIf it returns “Restricted”: scripts won’t run. To allow locally-created scripts while still blocking internet downloads:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserThis allows scripts you write yourself and from trusted local sources, while requiring internet-downloaded scripts to be signed. “Unrestricted” allows everything — fine for a personal machine, not recommended for shared or work computers. The scope “CurrentUser” applies only to your account; “LocalMachine” applies system-wide (requires admin).
Writing your first script
A PowerShell script is a plain text file with a .ps1 extension. Create one in Notepad or VS Code. Example — a script that shows disk usage and the 10 largest files in Downloads:
# disk_check.ps1
Write-Host "=== Disk Space ===" -ForegroundColor Cyan
Get-PSDrive -PSProvider FileSystem | Format-Table Name, @{N="Used GB";E={[math]::Round($_.Used/1GB,2)}}, @{N="Free GB";E={[math]::Round($_.Free/1GB,2)}}
Write-Host "=== 10 Largest Files in Downloads ===" -ForegroundColor Cyan
Get-ChildItem "$env:USERPROFILEDownloads" | Sort-Object Length -Descending | Select-Object -First 10 | Format-Table Name, @{N="Size MB";E={[math]::Round($_.Length/1MB,2)}}Save as disk_check.ps1 → run: .disk_check.ps1. This is a basic but practical script — it gives you information at a glance without navigating through multiple settings menus.
Common beginner mistakes
- Running everything as admin: unnecessary and increases risk. Only use admin when a command specifically requires it.
- Confusing PowerShell and CMD: some CMD commands work in PowerShell (ipconfig, ping, netstat) but PowerShell commands don’t work in CMD. Stick to one.
- Using spaces in paths without quotes:
cd C:Program Filesfails. Usecd "C:Program Files"with quotes for paths containing spaces. - Forgetting -WhatIf: most modification commands support
-WhatIf— shows what would happen without actually doing it.Remove-Item *.log -WhatIfshows which files would be deleted without deleting them. Use this before any bulk operation.
PowerShell rewards incremental use. The most effective way to build proficiency: each time you click through menus to find system information, ask whether a PowerShell command could get that information faster. Get-Process instead of opening Task Manager. Get-PSDrive instead of opening File Explorer. These small substitutions build the command familiarity that makes more complex uses feel natural over time.
Variables — storing and reusing values
Variables in PowerShell start with $. Assign a value with =, use it anywhere afterward:
$name = "Alice"
Write-Host "Hello, $name" # outputs: Hello, Alice
$downloads = "$env:USERPROFILEDownloads"
Get-ChildItem $downloads # lists files in Downloads
$bigFiles = Get-ChildItem C: -Recurse | Where-Object {$_.Length -gt 500MB}
$bigFiles | Select-Object Name, Length # reference the results multiple timesVariables make scripts readable and reduce repetition. $env:USERPROFILE is a built-in environment variable that expands to the current user’s profile folder (C:UsersYourName). Using environment variables instead of hardcoded paths makes scripts work correctly for any user account.
Useful built-in variables and automatic variables
$env:USERPROFILE— current user’s home directory$env:TEMP— temporary files directory$env:COMPUTERNAME— the PC’s name$PSVersionTable— PowerShell version information$Error— the last error(s) that occurred$true/$false— boolean values$null— represents “no value”
Environment variables (the $env: prefix) are particularly useful in scripts shared between users or machines — they automatically resolve to the correct path without needing to hardcode usernames or drive letters.
Managing Windows with PowerShell — practical examples
# Clear Windows temp files
Remove-Item "$env:TEMP*" -Recurse -Force -ErrorAction SilentlyContinue
# Check Windows Update status
Get-WindowsUpdateLog
# Install a Windows feature (example: Telnet client)
Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient
# Get system information
Get-ComputerInfo | Select-Object WindowsVersion, TotalPhysicalMemory, CsName
# Find and stop a process by name
Get-Process chrome | Stop-Process
# Create a scheduled task (runs a script daily at 8am)
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-File C:Scriptsdaily.ps1"
$trigger = New-ScheduledTaskTrigger -Daily -At "08:00"
Register-ScheduledTask -TaskName "DailyScript" -Action $action -Trigger $triggerWinget integration with PowerShell
The Windows Package Manager (winget) works directly from PowerShell — and PowerShell scripts using winget are the fastest way to set up a new Windows 11 machine with standard software:
# Install multiple applications in one script
$apps = @("Google.Chrome", "Notepad++.Notepad++", "VideoLAN.VLC", "Git.Git", "Microsoft.VisualStudioCode")
foreach ($app in $apps) {
winget install $app --silent --accept-package-agreements --accept-source-agreements
}Run this script on a fresh Windows 11 install and every listed application installs silently without prompts. This approach — a personal “setup script” saved to cloud storage — means reinstalling a machine goes from hours of manual downloads and installer wizards to a single script run that handles everything automatically.
Error messages — reading them, not fearing them
PowerShell error messages appear in red and look alarming to new users. Most contain useful information: the error type, the specific problem, and often the line number in a script. A typical error message:
Get-Item : Cannot find path 'C:nonexistent' because it does not exist.
At line:1 char:1This tells you exactly what happened — the path doesn’t exist. Not a crash, not a broken system — a specific, fixable issue. Getting comfortable reading error messages rather than immediately closing the window is the skill that most accelerates PowerShell proficiency. Each error message is information, not a failure.
The -ErrorAction SilentlyContinue parameter on most commands suppresses errors when you expect some commands to fail (like searching for files where you don’t have access to all folders). -ErrorAction Stop halts a script on any error. These are the two most useful error handling options for beginners before learning the full try-catch exception handling system.
Where to go next
After the basics: the PowerShell learning path that works best in practice is working backward from something you want to automate. Find a repetitive task you do manually — clearing temp files, backing up specific folders, generating a report of installed applications — then figure out the PowerShell commands that accomplish each step. The documentation, tab completion, and Get-Help make this exploratory approach effective even without a course or book.
For structured learning: Microsoft’s PowerShell learning modules at learn.microsoft.com are free, browser-based, and include interactive exercises. For scripting automation: the PowerShell Gallery (powershellgallery.com) provides thousands of community modules that add capabilities far beyond what’s built in, installable with Install-Module [ModuleName] from any PowerShell session.
PowerShell’s learning curve is front-loaded — the first few commands feel unfamiliar and the syntax takes getting used to. After a week of occasional use: the pattern clicks, tab completion speeds up command entry, and the genuine power of combining commands through the pipeline starts to show. The users who dismiss PowerShell as “too complex” are usually those who tried once when they needed something specific and didn’t find the right command immediately. The approach that works better: spend 30 minutes intentionally exploring with Get-Help and tab completion, and the tool reveals itself as more approachable than its reputation suggests.
Useful PowerShell modules to know about
The core PowerShell installation is extended by modules — additional command sets for specific domains. Some pre-installed; others installed from the Gallery. Useful ones: If this sounds familiar, Windows Terminal in Windows 11 is worth a look.
- PSReadLine (pre-installed): makes the PowerShell command line behave like a proper shell — command history search (Ctrl+R), inline syntax highlighting, multi-line editing. If you’re using PowerShell 7+ it’s already there; older versions may need updating.
- Microsoft.PowerShell.Management (pre-installed): core management commands including Get-Process, Get-Service, Set-Location.
- Microsoft.WinGet.Client (installable): proper PowerShell integration with Windows Package Manager, exposing winget as PowerShell objects rather than raw command output.
- PSScriptAnalyzer (installable): analyses your PowerShell scripts for errors, bad practices, and style issues — like a linter for PowerShell code.
Check what modules are already loaded: Get-Module. Check what’s available: Get-Module -ListAvailable. Install from the Gallery: Install-Module [Name] -Scope CurrentUser. The -Scope CurrentUser parameter installs without requiring administrator rights, which is the appropriate scope for most personal module installations. Our guide on Windows 11 Computer Management covers an adjacent issue.
PowerShell has been the scripting language of choice for Windows automation since Windows 7 made it default, and Windows 11 deepens that integration. Every Windows administration guide, Microsoft documentation article, and IT support procedure references PowerShell commands. Learning the basics now means those guides become immediately actionable rather than requiring additional research to implement. That’s the practical return on the investment of getting comfortable with the tool. See also Windows 11 Group Policy Editor for a related case.







