Last updated:
PowerShell 7 installs separately from the Windows PowerShell 5.1 included with Windows. You can install the stable package with WinGet on a suitable Windows client, or use Microsoft‘s official installation packages. Check the version in the shell you actually launch.
Windows PowerShell 5.1 and PowerShell 7
powershell.exe launches Windows PowerShell. pwsh launches PowerShell 7 when it is installed and available through the executable search path. Installing PowerShell 7 does not replace Windows PowerShell 5.1, and some Windows-specific modules still need the older shell or a supported compatibility method.
Open the shell you want to check and run:
$PSVersionTable.PSVersion
$PSVersionTable.PSEdition
The first command shows that session’s version. The edition normally reads Desktop for Windows PowerShell 5.1 and Core for PowerShell 7. A Terminal window’s appearance does not prove which shell is running. Microsoft’s getting-started guide explains the version information.
Choose the appropriate installation method
| Method | Useful for | What to check |
|---|---|---|
| WinGet | Installing the stable package on a Windows client with Windows Package Manager available. | The package format selected for that release. |
| Official MSI, where provided | Deployment or administrative scenarios requiring the MSI installation model. | Supported release, architecture and installer options. |
| Microsoft Store / MSIX | A packaged installation with its own update behavior. | Per-user installation and administrative-feature limitations. |
| Official ZIP | Portable or separate-version setups. | Manual setup and updates described in Microsoft’s instructions. |
Follow Microsoft’s current Windows installation documentation for package availability. A preview package is intended for testing upcoming changes. Use the stable Microsoft.PowerShell package for this walkthrough.
Install the stable version with WinGet
Open a command shell and check that Windows Package Manager is available:
winget --version
winget search --id Microsoft.PowerShell --exact
If Windows cannot find winget, check Microsoft’s WinGet requirements and installation instructions, or choose another supported package method. WinGet availability on Windows Server depends on the server version and installation type.
Install the stable PowerShell package:
winget install --id Microsoft.PowerShell --source winget
Read the package and installation prompts. Depending on the release, WinGet can select an MSIX package. Microsoft currently documents this MSI selector when an MSI is available:
winget install --id Microsoft.PowerShell --source winget --installer-type wix
Choose the package format according to the features you need. Store-based installations have limitations for system-level configuration and incoming PowerShell remoting. Check those limits before using a packaged installation for administration.
Install from an official package instead
Use the download links in Microsoft’s installation documentation or the official PowerShell release repository. Select the stable release and the package for the system’s processor architecture. Run the installer and follow its prompts. On a managed PC, follow your organization’s deployment process.
There is no need to copy an old download-and-execute PowerShell script from this article. Choosing an identifiable official package makes it easier to see which release and installation method you are using.
Update an existing installation
For an installation recognized by WinGet, first check its recorded package, then request the update:
winget list --id Microsoft.PowerShell --exact
winget upgrade --id Microsoft.PowerShell --source winget
Read the result rather than assuming every installation updates through WinGet. Microsoft Store, MSI and ZIP installations can have different update paths. If the existing package or installer type is not recognized, use the documentation for that installation method. The WinGet upgrade reference explains matching and upgrade options.
Start the new shell and verify it
Close the old session and open PowerShell 7 from Start, select its profile in Windows Terminal, or run pwsh from a new command shell. Run $PSVersionTable.PSVersion again in that session. Reopening Windows PowerShell 5.1 will still report 5.1 even when PowerShell 7 is installed correctly.
Test important scripts and modules before switching their scheduled tasks or shortcuts. Our BitLocker command guide, for example, uses the Windows manage-bde executable and does not require PowerShell 7.
Keep the operating system supported as well as the shell. Standard Windows 10 support ended on October 14, 2025. Installing PowerShell 7 does not restore ordinary Windows security support. Review Microsoft’s support options and the Windows setup checklist when preparing the computer.