PowerShell is one of the most useful tools built into Windows 11. It can manage files, processes, services, network connections, system settings, and much more from a command line. It also provides a powerful scripting environment for automating repetitive tasks.
There is one important distinction to understand in 2026: Windows 11 includes Windows PowerShell 5.1 by default, while PowerShell 7 is a separate, newer version that you can install alongside it. PowerShell 7 does not replace Windows PowerShell 5.1. Microsoft continues to maintain PowerShell 7 as the actively developed, cross-platform edition, while Windows PowerShell 5.1 receives security updates as part of Windows.
Windows Terminal also isn’t a replacement for PowerShell. It is a modern terminal application that can host PowerShell, Command Prompt, WSL distributions, and other command-line applications. When Windows Terminal is first installed, its default profile is Windows PowerShell.
For beginners, the biggest advantage of PowerShell is its consistent Verb-Noun naming system. Commands such as Get-Process, Get-Service, and Get-ChildItem tell you what they do just from their names.
PowerShell also works with objects, rather than treating command output purely as plain text. That means you can take the result of one command, filter or sort its properties, and send it directly into another command with the pipe (|).
Here are 20 PowerShell commands worth learning on Windows 11 in 2026.
PowerShell Commands at a Glance
| Command | What it does |
|---|---|
Get-Help | Displays command documentation |
Get-Command | Finds available commands |
Get-ChildItem | Lists files and folders |
Set-Location | Changes the current directory |
Copy-Item | Copies files and folders |
Move-Item | Moves or renames files and folders |
Remove-Item | Deletes files and folders |
Get-Item | Gets information about a file or folder |
Get-Process | Lists running processes |
Stop-Process | Stops a running process |
Get-Service | Lists Windows services |
Restart-Service | Restarts a Windows service |
Get-Content | Reads a text file |
Select-String | Searches text in files |
Test-NetConnection | Tests network connectivity |
Get-ComputerInfo | Displays system information |
Get-WinEvent | Reads Windows event logs |
Get-ExecutionPolicy | Checks script execution policy |
Set-ExecutionPolicy | Changes script execution policy |
Get-Command winget | Checks whether a command is available |
1. Get-Help
Get-Help is the built-in documentation system for PowerShell. If you don’t know how a cmdlet works, this should usually be your first stop.
You can request basic information, detailed documentation, examples, or an online version of the Microsoft documentation.
Syntax:
Get-Help <cmdlet-name> [-Examples] [-Detailed] [-Online]
Examples:
Get-Help Get-Process
Get-Help Get-Process -Examples
Get-Help Get-Service -Online
You can also use:
Get-Help about_*
to discover PowerShell’s conceptual help topics.
Microsoft notes that Get-Help can display information about cmdlets, functions, providers, scripts, and other PowerShell concepts.
If your local help files are incomplete, you can update them with:
Update-Help
2. Get-Command
Get-Command helps you find a command when you know what you want to accomplish but don’t remember the exact cmdlet name.
This is particularly useful because PowerShell uses the Verb-Noun naming convention.
Syntax:
Get-Command [-Verb <verb>] [-Noun <noun>]
Examples:
Get-Command -Noun Service
Lists commands related to services.
Get-Command -Verb Restart
Shows commands that use the Restart verb.
You can also search by wildcard:
Get-Command *Network*
This makes Get-Command one of the most useful commands for beginners.
3. Get-ChildItem
Get-ChildItem lists files and directories.
It is the PowerShell equivalent of commands such as dir and ls, both of which are available as aliases.
Syntax:
Get-ChildItem [-Path <path>] [-Recurse] [-Filter <pattern>]
Examples:
Get-ChildItem
Lists the current directory.
Get-ChildItem C:\Users
Lists the contents of the Users directory.
Get-ChildItem C:\Logs -Recurse -Filter *.log
Searches recursively for .log files.
You can also sort the resulting file objects:
Get-ChildItem | Sort-Object Length -Descending
Unlike plain text output, the objects returned by Get-ChildItem contain properties such as file size, path, creation time, and modification time.
4. Set-Location
Set-Location changes the current PowerShell working directory.
The familiar cd command is an alias for it.
Syntax:
Set-Location -Path <path>
Examples:
Set-Location C:\Windows\System32
You can return to your home directory with:
Set-Location ~
For temporarily changing directories, PowerShell also provides:
Push-Location C:\Temp
Then return to the previous location with:
Pop-Location
This is particularly useful inside scripts.
5. Copy-Item
Copy-Item copies files and folders.
It replaces many everyday uses of the older copy command and supports useful PowerShell parameters such as -Recurse and -WhatIf.
Syntax:
Copy-Item -Path <source> -Destination <destination> [-Recurse]
Examples:
Copy-Item report.txt D:\Backup\
Copy a single file.
Copy-Item C:\Reports D:\Backup\Reports -Recurse
Copy an entire directory.
Before performing a potentially large operation, you can use:
Copy-Item C:\Reports D:\Backup\Reports -Recurse -WhatIf
-WhatIf shows what PowerShell would do without actually performing the operation.
6. Move-Item
Move-Item moves files and directories and can also be used to rename them.
Syntax:
Move-Item -Path <source> -Destination <destination>
Examples:
Move-Item report.txt D:\Archive\
Move a file.
Move-Item old-report.txt new-report.txt
Rename a file.
For potentially destructive operations, -WhatIf is useful here too:
Move-Item *.log D:\Archive\ -WhatIf
7. Remove-Item
Remove-Item deletes files and folders.
It replaces common uses of del and rmdir.
Syntax:
Remove-Item -Path <path> [-Recurse] [-Force] [-WhatIf]
Examples:
Remove-Item old.txt
Delete a file.
Remove-Item C:\Temp\OldLogs -Recurse
Delete a directory and its contents.
Before deleting a large directory, use:
Remove-Item C:\Temp\OldLogs -Recurse -WhatIf
This is one command where understanding -WhatIf can prevent an expensive mistake.
Be especially careful with -Recurse and -Force.
8. Get-Item
Get-Item retrieves an individual file, directory, registry key, or another supported PowerShell provider item.
Examples:
Get-Item C:\Windows\notepad.exe
You can inspect specific properties:
(Get-Item C:\Windows\notepad.exe).Length
For a file, you can also display useful metadata:
Get-Item C:\Windows\notepad.exe | Select-Object Name, Length, LastWriteTime
This becomes particularly useful when combined with PowerShell’s object pipeline.
9. Get-Process
Get-Process displays the applications and processes currently running on Windows.
It is one of the most useful PowerShell commands for troubleshooting high CPU or memory usage.
Syntax:
Get-Process [-Name <process-name>]
Examples:
Get-Process
List running processes.
Get-Process chrome
Find Chrome processes.
To see the processes consuming the most CPU:
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10
You can also search for processes using significant memory:
Get-Process |
Where-Object {$_.WorkingSet -gt 500MB}
10. Stop-Process
Stop-Process terminates a running process.
It can be useful when an application has stopped responding and you don’t want to open Task Manager.
Examples:
Stop-Process -Name notepad
Or use the process ID:
Stop-Process -Id 1234
For an application that refuses to close:
Stop-Process -Name notepad -Force
Use -Force carefully because it can terminate an application without allowing it to save unsaved work.
11. Get-Service
Windows relies on hundreds of background services for functions such as networking, updates, printing, security, and system management.
Get-Service lets you inspect those services directly from PowerShell.
Syntax:
Get-Service [-Name <service-name>]
Examples:
Get-Service
List all services.
Get-Service -Name Spooler
Check the Print Spooler.
You can find stopped services:
Get-Service | Where-Object {$_.Status -eq "Stopped"}
Or look for a specific Windows service:
Get-Service -Name wuauserv
12. Restart-Service
Restart-Service restarts a Windows service without requiring you to open the Services management console.
For example:
Restart-Service -Name Spooler
This can be useful when Windows printing becomes stuck.
You can combine it with Get-Service:
Get-Service Spooler
Check the current state first, then restart it if necessary.
Administrative permissions may be required for services that cannot be controlled by a standard user.
13. Get-Content
Get-Content reads the contents of a text file.
It is especially useful for configuration files and logs.
Syntax:
Get-Content -Path <path> [-Tail <number>] [-Wait]
Examples:
Get-Content C:\Logs\app.log
Read a complete file.
To display only the last 20 lines:
Get-Content C:\Logs\app.log -Tail 20
To monitor a log as new entries are written:
Get-Content C:\Logs\app.log -Tail 20 -Wait
This provides functionality similar to tail -f on Linux without installing another tool.
14. Select-String
Select-String searches files for a specified text pattern.
It is broadly comparable to grep on Linux.
Syntax:
Select-String -Path <path> -Pattern <text>
Examples:
Select-String -Path C:\Logs\*.log -Pattern "ERROR"
Search all log files for ERROR.
You can search an entire directory tree:
Get-ChildItem C:\Projects -Recurse -Filter *.txt |
Select-String -Pattern "TODO"
For a case-sensitive search:
Select-String -Path notes.txt -Pattern "PowerShell" -CaseSensitive
The results include useful information such as the matching line and line number.
15. Test-NetConnection
Test-NetConnection is one of the most useful built-in PowerShell networking commands.
It can check whether a computer is reachable and whether a specific TCP port is accessible.
Syntax:
Test-NetConnection -ComputerName <host> [-Port <port>] [-TraceRoute]
Examples:
Test-NetConnection google.com
Test basic connectivity.
Test-NetConnection google.com -Port 443
Check HTTPS connectivity on TCP port 443.
For a Windows file server:
Test-NetConnection SERVER01 -Port 445
You can also trace the network path:
Test-NetConnection google.com -TraceRoute
This makes the command useful when diagnosing firewall, server, or network connectivity problems.
16. Get-ComputerInfo
Get-ComputerInfo provides detailed information about the Windows installation and hardware environment.
Try:
Get-ComputerInfo
For a more focused result:
Get-ComputerInfo |
Select-Object WindowsProductName, WindowsVersion, OsBuildNumber, CsName
This is useful when you need to quickly collect Windows version and system information without navigating through multiple Settings pages.
17. Get-WinEvent
Windows records a huge amount of diagnostic information in Event Viewer.
Get-WinEvent lets you access those logs directly from PowerShell.
For example:
Get-WinEvent -LogName System -MaxEvents 20
Display the latest 20 events from the System log.
To look for errors:
Get-WinEvent -LogName System |
Where-Object {$_.LevelDisplayName -eq "Error"} |
Select-Object -First 20
This becomes especially powerful when troubleshooting crashes, driver problems, Windows services, and unexpected system behavior.
18. Get-ExecutionPolicy
PowerShell’s execution policy controls how Windows handles PowerShell scripts.
To see the current policy:
Get-ExecutionPolicy
To see policies at all available scopes:
Get-ExecutionPolicy -List
This is important when a script fails with an execution-policy-related error.
Remember that execution policy is a security feature and shouldn’t simply be disabled because a script doesn’t run.
19. Set-ExecutionPolicy
Set-ExecutionPolicy changes the execution policy at a selected scope.
For example:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
This changes the policy only for the current user rather than changing it for every user on the computer.
Before changing anything, check the existing configuration:
Get-ExecutionPolicy -List
For a single trusted script downloaded from the internet, you may instead be able to use:
Unblock-File -Path .\script.ps1
rather than changing the execution policy globally.
Do not blindly use Set-ExecutionPolicy Unrestricted or similar commands from random online tutorials. Understand what policy is currently being enforced and why the script is being blocked.
20. Get-Command for Winget and Other Windows Tools
Windows 11 includes the Windows Package Manager, commonly used through the winget command.
You can check whether PowerShell can find it with:
Get-Command winget
You can then use:
winget list
to see installed packages.
To find available updates:
winget upgrade
And to upgrade a specific application:
winget upgrade --id Microsoft.PowerShell
Microsoft recommends WinGet as one of the installation methods for PowerShell 7 on Windows clients. PowerShell 7 can also receive updates through Microsoft Update when that feature is enabled.
PowerShell 5.1 vs. PowerShell 7 in Windows 11
This distinction is important because many older PowerShell tutorials use the two names interchangeably.
Windows PowerShell 5.1
- Built into Windows 11
- Executable:
powershell.exe - Based on the older .NET Framework
- Receives security updates
- Remains available for compatibility with older Windows PowerShell modules
PowerShell 7
- Installed separately
- Executable:
pwsh.exe - Actively developed by Microsoft
- Cross-platform
- Available for Windows, macOS, and Linux
- Can run alongside Windows PowerShell 5.1
Microsoft explicitly states that PowerShell 7 does not replace Windows PowerShell 5.1. Both versions can be installed and used on the same Windows machine.
To check which PowerShell you’re currently using, run:
$PSVersionTable
Look for:
$PSVersionTable.PSVersion
And:
$PSVersionTable.PSEdition
For PowerShell 7, you’ll normally see the Core edition.
How to Install PowerShell 7 on Windows 11
If you want the current actively developed PowerShell, Microsoft recommends several installation methods, including WinGet.
The simplest option is:
winget install --id Microsoft.PowerShell --source winget
After installation, start PowerShell 7 with:
pwsh
You can verify it with:
$PSVersionTable.PSVersion
PowerShell 7 installs separately from Windows PowerShell 5.1, so installing it doesn’t remove the older version.
PowerShell Aliases You Should Know
You don’t have to type the full Verb-Noun cmdlet every time.
PowerShell includes aliases for many common commands.
| Familiar command | PowerShell cmdlet |
|---|---|
dir | Get-ChildItem |
ls | Get-ChildItem |
cd | Set-Location |
pwd | Get-Location |
cp | Copy-Item |
mv | Move-Item |
rm | Remove-Item |
cat | Get-Content |
For scripts that you intend to share with other PowerShell users, however, using the full cmdlet names is generally clearer.
The PowerShell Pipeline Is the Real Power
Learning individual commands is useful, but PowerShell becomes much more powerful when you connect commands using the pipe operator (|).
For example:
Get-Process |
Sort-Object CPU -Descending |
Select-Object -First 10
This does three things:
- Gets running processes.
- Sorts them by CPU usage.
- Displays the 10 highest entries.
Another example:
Get-Service |
Where-Object {$_.Status -eq "Running"} |
Sort-Object DisplayName
This finds running services and sorts them alphabetically.
You can build increasingly powerful commands by combining simple cmdlets instead of learning hundreds of complicated commands individually.
PowerShell vs. Command Prompt: Which Should You Use?
Command Prompt is still available in Windows 11 and remains useful for older batch files and commands designed specifically for cmd.exe.
PowerShell is generally more capable for administration, automation, scripting, object manipulation, and Windows management.
The biggest difference is how the two shells handle command output.
Command Prompt primarily works with text.
PowerShell works with objects and properties, allowing commands to pass structured information through the pipeline.
For example:
Get-Process | Where-Object {$_.CPU -gt 100}
PowerShell can inspect the actual CPU property of each process instead of forcing you to parse the text printed on the screen.
Windows Terminal can host both shells, so you don’t have to choose one permanently. Microsoft describes Terminal as a host for command-line applications including PowerShell, Command Prompt, and WSL.
Final Thoughts
PowerShell can look intimidating when you first open it, but its consistent naming system makes it easier to learn than its reputation suggests.
Start with these commands:
Get-Help
Get-Command
Get-ChildItem
Set-Location
Copy-Item
Move-Item
Remove-Item
Get-Process
Get-Service
Get-Content
Select-String
Test-NetConnection
Then learn the pipeline:
Command-1 | Command-2 | Command-3
Once you understand how PowerShell passes objects between commands, tasks that require several graphical Windows utilities can often be completed with a single command line.
And if you’re using Windows 11 in 2026, don’t confuse Windows PowerShell 5.1 with PowerShell 7. The former remains part of Windows, while the latter is Microsoft’s actively developed, cross-platform PowerShell experience. They can coexist on the same PC.
Add Tech2Geek as a preferred source on Google to see more of our latest tech articles.
Support Tech2Geek ❤️
Did this guide help you? If Tech2Geek saves you time or helps you solve a problem,
consider buying me a coffee. ☕
Your support helps keep Tech2Geek independent and free.


Comments