Upgrading Powershell Jun 2026
It is important to distinguish between the two branches of PowerShell:
Install pwsh , alias it to ps7 in your profile, and never look back. The blue console belongs in a museum, not your production automation.
: Improved speed for common tasks and new operators like && and || for pipeline chain operators .
Before starting, see what you already have installed by typing this command in your current PowerShell window: $PSVersionTable Step 2: Choose Your Upgrade Method Method A: Using Winget (Recommended for Windows 10/11) upgrading powershell
PowerShell has evolved from a Windows-only scripting language into a cross-platform, open-source automation framework. If you are still relying on the version that came pre-installed with your operating system, you are likely missing out on significant performance improvements and modern features.
After installing, launch pwsh and run these one-time commands:
PowerShell 7 does not look at %Windir%\System32\WindowsPowerShell\v1.0\Modules by default (where most 5.1 modules live). To fix this, add the legacy path to your PSModulePath environment variable: It is important to distinguish between the two
The modern standard is (often called "PowerShell Core"). It is open-source, cross-platform (Windows, Linux, macOS), and significantly faster. If your automation scripts still begin with #requires -Version 5.1 , you are working with the past.
Using dnf or yum :
winget search Microsoft.PowerShell winget install --id Microsoft.PowerShell --source winget Before starting, see what you already have installed
Run this diagnostic block in your new pwsh session:
$PSVersionTable.PSVersion