L1. PowerShell Setup: pwsh, Windows PowerShell, and Help
Install the right PowerShell, understand the difference between Windows PowerShell 5.1 and modern cross-platform PowerShell 7, and learn the help system that makes self-service learning possible.
What PowerShell Is
PowerShell is both an interactive shell and a scripting language built around .NET objects. Unlike a traditional text shell, commands usually pass structured objects through the pipeline. That means you can filter by properties, sort by dates, export clean CSV or JSON, and automate admin work without parsing fragile text.
There are two names you must keep separate:
| Name | Command | Typical use |
|---|---|---|
| Windows PowerShell 5.1 | powershell.exe | Built into Windows, still needed for some legacy Windows modules |
| PowerShell 7.x | pwsh | Current cross-platform PowerShell for Windows, Linux, and macOS |
pwsh; Windows PowerShell 5.1 remains available on Windows for compatibility.
Install and Verify
On Windows, the simplest route is normally winget:
winget install --id Microsoft.PowerShell --source winget
pwsh
$PSVersionTableOn macOS, Homebrew is common:
brew install --cask powershell
pwshOn Linux, use the Microsoft package instructions for your distribution. Avoid random curl-pipe-install snippets for production machines; package-manager installs are easier to patch and audit.
Your First Commands
Get-Command -Noun Process
Get-Help Get-Process -Examples
Get-Process | Select-Object -First 5PowerShell cmdlets use a Verb-Noun naming pattern. The verb tells you the action, and the noun tells you the resource. Get-Process, Stop-Service, and Export-Csv are easier to discover than short aliases when you are writing scripts for other people.
Lab
- Open
pwsh. - Run
$PSVersionTable.PSVersion. - Run
Get-Command -Verb Get | Select-Object -First 10. - Run
Get-Help about_PowerShell_exe. - Create a notes file named
powershell-lab.mdand record your version, operating system, and install method.
Sources
- Microsoft Learn: Install PowerShell on Windows, Linux, and macOS
- Microsoft Learn: What's new in PowerShell 7.5
- ✓Use pwsh for modern PowerShell 7 and powershell.exe for legacy Windows PowerShell 5.1
- ✓PowerShell passes .NET objects, not only text, through the pipeline
- ✓Cmdlets follow Verb-Noun naming, which improves discoverability and script readability
- ✓Get-Command discovers commands; Get-Help explains syntax, examples, and parameters
- ✓Use official package-manager installation paths so PowerShell can be updated safely
1. Which executable starts modern cross-platform PowerShell 7?
2. What makes the PowerShell pipeline different from many traditional shells?
Recommended: Pluralsight
This free course covers the theory. Pluralsight adds structured video courses, hands-on Azure labs, and timed practice exams to make it stick before exam day.