Cyber Intelligence
PowerShell Foundations · Foundation

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:

NameCommandTypical use
Windows PowerShell 5.1powershell.exeBuilt into Windows, still needed for some legacy Windows modules
PowerShell 7.xpwshCurrent cross-platform PowerShell for Windows, Linux, and macOS
Microsoft's current install documentation covers Windows, macOS, and Linux. The modern executable is 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
$PSVersionTable

On macOS, Homebrew is common:

brew install --cask powershell
pwsh

On 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 5

PowerShell 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

  1. Open pwsh.
  2. Run $PSVersionTable.PSVersion.
  3. Run Get-Command -Verb Get | Select-Object -First 10.
  4. Run Get-Help about_PowerShell_exe.
  5. Create a notes file named powershell-lab.md and record your version, operating system, and install method.

Sources

Exam Focus Points
  • 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
Knowledge Check

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.

Start AZ-500 prep free10-day free trial available