Home
How to Update PowerShell to the Latest Version on Windows
Updating PowerShell is a critical task for maintaining a secure, efficient, and modern computing environment. While Windows includes a version of PowerShell by default, the way you update it depends entirely on whether you are using the legacy Windows PowerShell 5.1 or the modern, cross-platform PowerShell 7. Unlike many other Windows components, PowerShell 7 does not automatically replace version 5.1; instead, they run side-by-side, each serving different purposes.
This comprehensive guide details every reliable method to update PowerShell on Windows, from command-line shortcuts to enterprise-grade deployment strategies.
Checking Your Current PowerShell Version
Before initiating an update, it is essential to identify the version currently running on your system. Windows typically has "Windows PowerShell" (version 5.1) pre-installed, but you may have manually installed "PowerShell" (version 7.x) at some point.
To check your version, follow these steps:
- Open a PowerShell window (search for "PowerShell" in the Start menu).
- Type or paste the following command and press Enter:
$PSVersionTable.PSVersion - Observe the output:
- If the Major version is 5, you are using Windows PowerShell 5.1. This version is considered a legacy component and only receives security patches through Windows Update.
- If the Major version is 7, you are using the modern PowerShell. This version is eligible for feature updates, performance improvements, and new cmdlets.
Understanding the Difference Between PowerShell 5.1 and 7
It is a common misconception that running Windows Update will automatically bring you to the latest version of PowerShell.
Windows PowerShell 5.1 is built into the Windows operating system. It relies on the full .NET Framework and is frozen in terms of new features. Microsoft maintains it for backward compatibility with older scripts and specific Windows-only modules. You cannot "update" 5.1 to 7 in a traditional sense; you must install PowerShell 7 as a separate product.
PowerShell 7 (and higher) is built on .NET 8 (or the latest .NET version), making it significantly faster and cross-platform (running on Linux and macOS as well). When you update PowerShell 7, you are moving from one minor version (e.g., 7.4) to another (e.g., 7.5). These versions use the executable name pwsh.exe, whereas the older version uses powershell.exe.
Method 1: Update Using WinGet (Recommended for Clients)
The Windows Package Manager, or WinGet, is the most efficient and recommended way to update PowerShell on modern Windows 10 and 11 systems. It handles the download and installation via the command line, ensuring you get the official stable release.
How to use WinGet for PowerShell Updates
If you already have PowerShell installed via WinGet or if you want to perform a fresh upgrade, use the following steps:
- Open PowerShell or the Command Prompt (CMD).
- Run the search command to see the available versions:
winget search Microsoft.PowerShell - To install or update to the latest stable version, execute:
winget install --id Microsoft.PowerShell --source winget - If you prefer the Preview version (to test the latest upcoming features), use:
winget install --id Microsoft.PowerShell.Preview --source winget
Pro Tip: In our testing, using the --source winget parameter is vital to avoid ambiguity if multiple repositories are configured on your machine. WinGet will automatically detect if an existing version of PowerShell 7 is present and perform an in-place upgrade.
Method 2: Update via the Microsoft Store
For casual users who prefer a "set it and forget it" approach, the Microsoft Store is an excellent option. When you install PowerShell from the Store, Windows handles the updates automatically in the background, much like it does for apps like Calculator or Photos.
Steps to Update via the Store
- Open the Microsoft Store app from your Start menu.
- Search for PowerShell.
- If an update is available and you already have the Store version installed, you will see an Update button. If you see Open, you are already on the latest version.
- To check for updates manually, go to the Library icon (bottom left) and click Get updates.
Limitations of the Store Version: While convenient, the Store version runs in a "sandboxed" environment. This can sometimes cause issues with specific system-level modules or file system permissions. If you are a developer or a system administrator, the WinGet or MSI methods are generally preferred for better integration with the OS.
Method 3: Using the MSI Installer (Best for Servers and IT Admins)
The MSI (.msi) package is the gold standard for enterprise environments and Windows Server deployments. It allows for granular control over the installation process and supports automated deployment tools like Microsoft Endpoint Configuration Manager (MECM) or WSUS.
Manual MSI Installation
- Visit the Official PowerShell GitHub Releases page.
- Scroll down to the Assets section of the latest "Stable" release.
- Download the version corresponding to your architecture:
PowerShell-7.x.x-win-x64.msi(for 64-bit Windows)PowerShell-7.x.x-win-arm64.msi(for ARM-based devices like Surface Pro X)
- Run the installer and follow the GUI prompts.
Enabling Microsoft Update Integration
One of the most powerful features of the MSI installer (starting with PowerShell 7.2) is the ability to opt into Microsoft Update. During the installation wizard, you will encounter a screen asking if you want to use Microsoft Update to keep PowerShell updated.
Checking these boxes ensures that PowerShell 7 updates appear alongside your standard Windows monthly security patches. In an enterprise setting, this allows admins to manage PowerShell updates via their existing update management flow.
Silent Installation for Admins
If you need to update PowerShell across dozens of servers, you can use the msiexec.exe command to perform a silent update. Here is a sample command that enables Microsoft Update and adds PowerShell to the system PATH:
-
Topic: Installing PowerShell on Windows - PowerShell | Microsoft Learnhttps://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5
-
Topic: Install PowerShell 7 on Windows - PowerShell | Microsoft Learnhttps://learn.microsoft.com/is-is/powershell/scripting/install/install-powershell-on-windows?view=powershell-7.6
-
Topic: PowerShell-Docs/reference/docs-conceptual/install/microsoft-update-faq.yml at main · MicrosoftDocs/PowerShell-Docs · GitHubhttps://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/docs-conceptual/install/microsoft-update-faq.yml