Windows 11 includes Windows PowerShell 5.1, but modern PowerShell 7 is a separate product that can be installed and updated alongside it. If you use PowerShell 7, one of the simplest supported ways to update it on a Windows client is with Windows Package Manager (WinGet).
Check Which PowerShell You Are Using
- Open the PowerShell version you normally use.
- Enter
$PSVersionTable.PSVersionand press Enter. - Check the major version number shown in the result.
Version 5.1 is Windows PowerShell, which is built into Windows. PowerShell 7 is the newer cross-platform product and normally runs as pwsh.exe. Installing PowerShell 7 does not remove Windows PowerShell 5.1.
How to Update PowerShell 7 with WinGet
- Open Windows Terminal, PowerShell, or Command Prompt.
- Enter
winget upgrade --id Microsoft.PowerShelland press Enter. - Review the package information and prompts.
- Allow WinGet to install the available PowerShell update.
- Close the old PowerShell session, open PowerShell 7 (pwsh) again, and run
$PSVersionTable.PSVersionto verify the installed version.
If PowerShell 7 is not installed yet, Microsoft documents winget install --id Microsoft.PowerShell --source winget as an installation method.
What If WinGet Is Not Available?
Microsoft also supports installing PowerShell manually using its current installer packages. Download PowerShell only from Microsoft’s documented sources. The exact package format can vary by PowerShell release, so follow the current Microsoft installation page rather than relying on an old installer link.
Does Windows Update Update PowerShell 7?
Do not assume that updating Windows itself upgrades every PowerShell 7 installation. The servicing method depends on how PowerShell was installed. If you are unsure whether WinGet can upgrade your copy, Microsoft documents winget list --id Microsoft.PowerShell --upgrade-available as a way to check for an available WinGet upgrade.
Windows PowerShell 5.1 vs. PowerShell 7
Windows PowerShell 5.1 remains part of Windows for compatibility. PowerShell 7 installs side by side, so scripts or modules that depend on Windows PowerShell can continue using it while you use PowerShell 7 for newer work. Check compatibility before moving an important automation from one edition to the other.
Summary
First check your version with $PSVersionTable.PSVersion. If you use PowerShell 7, WinGet provides a straightforward update path with winget upgrade --id Microsoft.PowerShell. Windows PowerShell 5.1 and PowerShell 7 are separate products, so do not treat an update to one as an update to the other.