On November 17, 2026, Microsoft announced that Windows PowerShell 5.1, the version built into Windows, is now deprecated. In a post on the official PowerShell Team blog, the company said that "beginning with the next release of Windows, PowerShell 7 will be included as the upgrade for Windows PowerShell 5.1." The roadmap is laid out in a support document published the same day, KB5137172.
Windows 11 26H2 and Server 2025 Are the Last to Enable 5.1 by Default
According to KB5137172, Windows PowerShell 5.1 is no longer under active development. It remains part of Windows and stays supported, receiving security updates in line with the lifecycle of each Windows version. Scripts and tools that depend on 5.1 will keep working as before, the document says.
The timeline in the document is as follows.
| Timing | Status of Windows PowerShell 5.1 |
|---|---|
| 2026 | Deprecated. Windows 11 version 26H2 and Windows Server 2025 are the last versions with it enabled by default |
| Next version of Windows | Available as a Feature on Demand (FOD) |
| Later versions of Windows | Not available |
Microsoft says the timing of removal will be decided based on usage data and announced in advance. The document lists Windows 11 Home and Pro, versions 24H2, 25H2, and 26H2, as the products it applies to.
PowerShell 7 Ships as MSIX and Runs Side by Side With 5.1
The PowerShell Team blog post, titled "PowerShell 7 is coming to Windows," states that "PowerShell 7 is designed to be used side by side with Windows PowerShell 5.1" and that "your existing automation needs no changes." Version 5.1 continues to run scripts, scheduled tasks, and services as is.
The PowerShell 7 included in Windows is delivered as an MSIX package. The blog lists known gaps compared with the traditional MSI version: running as SYSTEM (scheduled tasks, services, device-management scripts, and remoting), DISM cmdlets such as Add-WindowsCapability, and machine-wide settings such as the all-users profile. These are being tracked on GitHub. As of this writing, Microsoft has not said which version of PowerShell 7 will be included or how it will be updated.
The Executable Name and PSEdition Tell the Two Apart
The two versions of PowerShell can be distinguished by their executable names. According to KB5137172, powershell.exe launches Windows PowerShell 5.1, while pwsh.exe launches PowerShell 7 or later. Within a running session, the variable $PSVersionTable.PSEdition returns "Desktop" on 5.1 and "Core" on 7 or later.
Scripts that only work on 5.1 can declare that requirement by adding #Requires -Version 5.1 or #Requires -PSEdition Desktop at the top. The document recommends identifying scripts, scheduled tasks, installers, management agents, and modules that call powershell.exe.
Admins Should Start With an Inventory and Testing
Microsoft asks that new automation be built on PowerShell 7 and that migration of existing automation be planned. The company's blog urges users to "test your scripts in PowerShell 7 before you move them," noting that some will run unchanged, some will need changes, and some may need to stay on 5.1. Microsoft also plans tooling for inventory, analysis, and guidance, including compatibility checks in PSScriptAnalyzer.
At the same time, Microsoft acknowledges that some modules and tools work only on 5.1. KB5137172 says 5.1 can continue to be used for those purposes and that no immediate changes are required. The company has also set up a new Inbox Working Group to triage issues with PowerShell 7 in Windows.
The Side-by-Side Period Gives Admins Room to Migrate
In our view, phasing 5.1 out through a Feature on Demand rather than removing it outright is a realistic approach for enterprise IT administrators. Because both versions can be installed at the same time, there is plenty of room to test and migrate gradually.
However, the remaining limits of the MSIX version, such as running as SYSTEM and DISM cmdlets, are a concern. The impact is likely to be heaviest in environments with many scripts run from Task Scheduler or management tools. Still, since removal will be announced in advance, the first step is likely to be finding every place that calls powershell.exe.
Summary
Windows PowerShell 5.1 is now deprecated: the next release of Windows will include PowerShell 7, while 5.1 moves to a Feature on Demand and will become unavailable in future versions of Windows. The change matters most to enterprise IT administrators who run scripts and management tools built around 5.1. The removal date has not been set, and Microsoft says it will announce it in advance, so it is worth keeping an eye on updates to KB5137172.