PowerShell 7 Will Ship Inside Windows, and Windows PowerShell 5.1 Is Now Deprecated
Microsoft says PowerShell 7 will come with the next Windows release and that Windows Server 2025 and Windows 11 26H2 are the last to include PowerShell 5.1 enabled by default. Removal has no date yet.

In this article
Table of Contents
Table of contents
Microsoft has confirmed that PowerShell 7 will ship inside Windows, starting with the next release of the operating system, and that Windows PowerShell 5.1 is now deprecated. Nothing breaks today: 5.1 stays supported and keeps its security updates. But Microsoft’s support article, KB5137172, says Windows ServerThe KBY LexiconWindows ServerWindows Server is Microsoft's server operating system family, providing directory, network and application services as installable roles. 2025 and Windows 11 version 26H2 are the last Windows versions to include 5.1 enabled by default, and that it “will be removed from a future version of Windows”. The PowerShell team announced the plan late on Tuesday 17 November, and The Register reported it on Wednesday 18 November.
#What Microsoft has actually committed to
There are two Microsoft documents, and they agree. The PowerShell team’s blog post says that “beginning with the next release of Windows, PowerShell 7 will be included as the upgrade for Windows PowerShell 5.1”. The Windows team’s article, KB5137172, sets out what happens to 5.1 and is written for Windows 11 administrators.
The support article gives a three-step timeline. In 2026, Windows PowerShell 5.1 is deprecated, meaning it is no longer in active development and gets no new features. In the next version of Windows, 5.1 becomes a Feature on Demand, “enabled by default on new Windows installs”. In a future version, it is “not available”. Microsoft says the timing of that last step “will be based on usage data and communicated in advance”. It has not given a date, and it has not named the next Windows release. The Register guessed at a name; Microsoft did not.
The security position is the part that most estates need to hear first. KB5137172 says 5.1 “will continue to receive security updates according to the lifecycle of each version of Windows”, and that scripts and tools relying on it “will continue to run”. In reply to a reader on the blog post, the PowerShell team added that the change is forward only: earlier versions, 26H2 included, keep Windows PowerShell 5.1 as it is today.
#Two engines, two executables
The two products already live side by side, and the support article leans on that. powershell.exe runs Windows PowerShell 5.1, built on the .NET Framework. pwsh.exe runs PowerShell 7 or later, built on modern .NET. Inside a script, $PSVersionTable.PSEdition reports Desktop for 5.1 and Core for 7 and later, and a script may also declare its needs at the top with #Requires -Version 5.1 or #Requires -PSEdition Desktop. Microsoft is also renaming the Windows PowerShell shortcuts to include the version number, 5.1.
Microsoft’s migration documentation lists the practical differences. PowerShell 7 installs to its own folder, uses its own profile location (Documents\PowerShell rather than Documents\WindowsPowerShell) and has its own module paths, although it can load many Windows PowerShell modules, and has a compatibility feature for those that still need the full .NET Framework. Some things are gone: PowerShell Workflow was removed because .NET Core has no Windows Workflow Foundation, and the older WMI v1 cmdlets were removed too. Because the underlying .NET differs, direct calls to .NET methods can bind to different overloads; Microsoft’s own example is String.Split(), where a call with two separator characters behaves differently unless the argument is cast to a character array.
#The three gaps Microsoft says it is still closing
The blog post is candid that the bundled PowerShell 7 is not yet a drop-in. PowerShell 7 in Windows is delivered as an MSIX package, and MSIX “still needs work to match some things that worked with the MSI installer”. Microsoft lists three gaps:
- running as the SYSTEM account, which it says affects scheduled tasks, services, device-management scripts and remoting;
- support for the DISM cmdlets, such as
Add-WindowsCapability; - machine-wide settings, such as the all-users profile.
Microsoft says these are in progress and tracked publicly. It also says some scripts “need changes before they work, and some may need to keep running in Windows PowerShell 5.1”, and that the way to find out which is to test in PowerShell 7. On the tooling to find them, it promises only that it is investing in community-built inventory and analysis tools and in compatibility checks in PSScriptAnalyzer, to be shared “as it’s ready”. It is also setting up an Inbox Working Group to triage PowerShell 7 issues in Windows.
Replies from the PowerShell team under the post draw one more boundary. The Windows PowerShell ISE is built for 5.1 and will not switch to PowerShell 7; Microsoft points people to Visual Studio Code with the PowerShell extension. Other products’ modules, including SCOM, the SharePoint OnlineThe KBY LexiconSharePoint OnlineSharePoint Online is Microsoft's cloud-based collaboration and document management service, delivered as part of Microsoft 365. module and the RSAT modules, belong to their own product teams, and Microsoft’s answer to questions about them was to tell those teams what you need.
#Why “nothing changes” is true and still not the whole story
For a script that runs today, Microsoft’s message is accurate: nothing changes. The catch is what changes around it. On a Windows build after 26H2, a fresh install will have 5.1 as an optional feature, even if enabled by default, and anything that assumes powershell.exe is part of the base image will be depending on a component Microsoft has already labelled as deprecated. We think provisioning scripts, gold images, task sequences and Intune packages are the likeliest to carry that assumption, because they were written when 5.1 was simply there.
Our reading of the three gaps is that the SYSTEM account matters most. Scheduled tasks, services, remediation scripts and many management agents run as SYSTEM, which is where much of the unattended automation in an estate lives. If PowerShell 7 in the box cannot run reliably as SYSTEM when it first ships, those jobs will have to stay on powershell.exe, and 5.1 remaining available as a Feature on Demand would give them somewhere to stay. This is our inference from Microsoft’s list, not something Microsoft has said, and the project’s own tracker is the place to check how far the work has got.
#Our view: use the notice period to count, not to migrate
We think this is a real change but not an emergency, and that most of the work for the next few months is counting. Microsoft has committed to telling administrators before it removes 5.1, and has tied the removal to usage data. The risk is not a surprise removal. It is that, when the notice does come, nobody knows which scripts, tasks, agents and installers still start powershell.exe, so every one has to be found under time pressure.
We expect the bundled PowerShell 7 to arrive before every compatibility gap has closed, because Microsoft has said so in terms, and that Feature on Demand will be how many estates keep 5.1 for a long time. What would prove us wrong is a dated removal announcement for 5.1 soon after the next Windows release. The decision in front of an IT team is whether to move new automation to PowerShell 7 now. We lean towards yes for anything that does not run as SYSTEM and does not need a 5.1-only module, and towards leaving everything else alone until the gaps close.
#What to do this week
None of this needs a change window. It needs an afternoon of looking.
- List scheduled tasks and services that start Windows PowerShell. A starting point on a single machine is
Get-ScheduledTask | Where-Object { $_.Actions.Execute -like '*powershell*' }, andGet-CimInstance Win32_Service | Where-Object PathName -like '*powershell*'for services. Run them through your management tooling to cover the estate. - Search your script repositories, packaged installers and Intune or Configuration Manager content for
powershell.exe,#Requires -Version 5.1and#Requires -PSEdition Desktop. The last two are scripts that have already told you they depend on 5.1. - Install PowerShell 7 on a test machine, run a sample of the important scripts under
pwsh.exe, and record which pass, which fail and which depend on a module that works only in 5.1. - Flag anything that runs as SYSTEM, uses DISM cmdlets such as
Add-WindowsCapabilityor relies on an all-users profile. These are the three areas Microsoft has said are unfinished, so leave them on 5.1 for now. - Ask your vendors the question in plain words: “Does your agent or module support PowerShell 7, and from which version?” Microsoft’s own SCOM, SharePoint Online and RSAT modules are in the same position.
If you do not run Windows PowerShell scripts at scale, for example a small office with no scheduled automation, you can stop reading: there is nothing to do yet.
#What we do not know yet
Microsoft has not said which Windows release will carry PowerShell 7, when 5.1 will be removed, or what usage level will trigger that decision. It has not said when the three MSIX gaps will close, and it has said it will share the inventory, analysis and guidance tools it describes as each is ready. The Register noted that finding and testing scripts across an estate falls to administrators; for now, that is true. We will update this story when Microsoft names the release or dates the removal.
Evidence trail
Sources and verification
Primary documentation and external technical references used in this article.
- 01PowerShell team, Microsoft: "PowerShell 7 is coming to Windows" (17 November 2026)devblogs.microsoft.com
- 02Microsoft Support: KB5137172, Windows PowerShell 5.1 Deprecationsupport.microsoft.com
- 03The Register: PowerShell 7 heading into Windows as 5.1 hits the end of the roadtheregister.com
- 04Microsoft Learn: Differences between Windows PowerShell 5.1 and PowerShell 7.xlearn.microsoft.com
- 05Microsoft Learn: Migrating from Windows PowerShell 5.1 to PowerShell 7learn.microsoft.com
About this page
Credited to
Dates
Published
Corrections
No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.
Read-only scripts
- Windows devices with no BitLocker recovery key in Entra IDMicrosoft Entra ID, Windows
- Intune devices that haven't synced in N daysMicrosoft Intune
- Mailboxes forwarding to external addressesExchange Online
- BitLocker status of every volume on this PCWindows
Upcoming deadlines
- Intune moves to macOS 15 and laterQ4 2026
- SAP SuccessFactors provisioning: move from basic auth to workload identityNovember 2026
- Intune November release: JIT registration reminder at APNs renewal and automatic JIT for eligible tenantsNovember 2026
Explore KBY
The KBY Brief
A short email about twice a week with new runbooks, configuration traps and fixes from KBY Technologies.
SubscribeMore news
All newsDiscover more
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Get new fixes by email.
New runbooks, configuration traps and fixes from KBY Technologies, about twice a week.




Comments
Add a thoughtful note on PowerShell 7 Will Ship Inside Windows, and Windows PowerShell 5.1 Is Now Deprecated. Comments are checked for spam and held for moderation before appearing.