How to Upgrade PowerShell?

Check your current PowerShell version with `$PSVersionTable.PSVersion`

Determine whether you need Windows PowerShell 5.1 or PowerShell 7+

For PowerShell 7+, download the latest installer from the official PowerShell GitHub releases page

Run the installer and follow the prompts

On Windows, install via Microsoft Store if available

On Windows, install via winget with `winget install Microsoft.PowerShell`

On macOS, install via Homebrew with `brew install –cask powershell`

On Linux, install using your distribution’s package manager or Microsoft’s package repository instructions

Verify the upgrade with `pwsh -v`

Update your profile, scripts, and shortcuts to use `pwsh` instead of `powershell` if needed

Restart any open terminals after installation

Suggested for You

Trending Today