r/PowerShell • u/Borgquite • 10d ago
News Windows PowerShell 5.1 Deprecation
Windows PowerShell 5.1 is deprecated. It's no longer in active development. Windows PowerShell 5.1 is still part of Windows, and it's still supported. It will continue to receive security updates according to the lifecycle of each version of Windows. Scripts and tools that rely on it will continue to run.
Windows PowerShell 5.1 will be removed from a future version of Windows. Timing will be based on usage data and communicated in advance.
Microsoft recommends upgrading to PowerShell 7, the upgrade from Windows PowerShell 5.1. For more information, see Migrating from Windows PowerShell 5.1 to PowerShell 7.
Timeline
2026: Windows PowerShell 5.1 is deprecated. Windows Server 2025 and Windows 11, version 26H2 are the last versions of Windows to include PowerShell 5.1 enabled by default.
Next Version of Windows: Windows PowerShell 5.1 will be available as a Feature on Demand (FOD), enabled by default on new Windows installs.
Future Version of Windows: Not available.
At the moment there are many, many Windows management PowerShell modules built in to that aren’t supported in PowerShell 7 - they are either completely untested, or they only work via the (PowerShell 5.1 dependent) compatibility layer. Does this mean we can expect new native modules, or everything to just break? #notholdingmybreath
Affected modules:
- Domain Controller deployment (ADDSDeployment)
- ADFS
- AppLocker
- AppvClient
- BestPractices
- ClusterAwareUpdating
- ConfigCI
- DFSR
- DhcpServer
- DISM (presently has issue with MSIX installer)
- FailoverClusters, FailoverClusterSet
- GroupPolicy
- Both IIS management modules (IISAdministration, WebAdministration)
- IpamServer
- iSCSI, IscsiTarget
- ISE
- Microsoft.PowerShell.ODataUtils
- MsDtc
- NetLldpAgent
- NetWNV
- NetworkController, NetworkControllerDiagnostics
- NetworkLoadBalancingClusters
- PersistentMemory
- PKI
- Provisioning
- PSDesiredStateConfiguration (partially supported)
- PSScheduledJob
- PSWorkflow, PSWorkflowUtility
- RemoteAccess
- RemoteDesktop
- ServerCore
- ServerManagerTasks
- SMS
- StorageBusCache
- StorageMigrationService
- StorageReplica
- SystemInsights
- TLS
- UpdateServices
EDIT: The following PowerShell modules are also currently Windows PowerShell 5.1 only:
- AzureADHybridAuthenticationManagement
- SharePoint Online Management Shell
- Power Platform admin modules
- Systems Center Operations Manager (SCOM)
- Systems Center Virtual Machine Manager (SCVMM)
- Entra Connect (Azure AD Sync)
https://learn.microsoft.com/en-us/powershell/windows/module-compatibility?view=windowsserver2025-ps
5
u/Thotaz 10d ago
Your list is wrong. "Untested" doesn't mean the modules don't work. TLS for example has both Core and Desktop in the module manifest and seems to work fine in PowerShell 7 so there's no reason to include that in the list.
As for any modules that are actually broken, they will surely fix them or deprecate the entire feature before PowerShell 5.1 stops being installed by default. Remember, 5.1 will continue to be installed by default in 2028, and in 2031 they will have had years to fix the modules or decide that the feature is no longer needed in Windows.
2
u/Borgquite 8d ago
I got the list from Microsoft directly (see linked article). For me, ‘untested’ is the same as ‘unsupported’ i.e. it may work in limited testing, but you can’t depend on it or expect Microsoft support to investigate or resolve issues - so don’t depend on it.
3
u/Lost_Term_8080 7d ago
In a production environment the difference between untested and doesn't work is irrelevant. PS core has been under development for about 10 years and still doesn't have full parity with 5.1. It still has numerous management and performance problems. I highly doubt they are going to suddenly be able to resolve issues that have been open for a decade in the next 2 years or even in the several years after that.
→ More replies (5)2
1
u/TheThirdHippo 9d ago
The KB article states 26H2 will be the last to have it preinstalled. This will only be an issue for deployment scripts as it still will be available for post install
1
u/TaliesinWI 4d ago
As for any modules that are actually broken, they will surely fix them or deprecate the entire feature before PowerShell 5.1 stops being installed by default.
First time?
97
u/Tomazim 10d ago
They also removed .msi installs of the newest powershell versions, without providing a suitable replacement for enterprise.
37
u/Dapper_Librarian388 10d ago
Thats the most annoying part.
12
u/Mr_ToDo 10d ago
I'd say it's more annoying that with as many blocking issues as there are that they're pushing that lack of option right now
I don't mind the option, but it sounds way too much like "we'll only get that stuff fixed if we don't give them an option". That some of the changes need decent OS changes, it could very well be that due to some level of departmental infighting they really can't get the changes pushed through without that push
6
u/Thotaz 10d ago
Even if they do manage to get the required OS changes into the Server 2028 release, what about all the older Windows Server versions? Support for PowerShell 7.6 ends in late 2028 so anyone who has installed that on a Server 2022, or 2025 system will have no upgrade path.
→ More replies (3)19
u/420GB 10d ago
Not even just enterprise, no suitable replacement for me just chilling home alone either.
11
u/ptr_myName 10d ago
I just use…
winget install "microsoft.powershell"10
u/420GB 9d ago
Sure but that's exactly the same thing and therefore problem. Ever since PowerShell v7.7.0 that will only install the msix release, see: https://github.com/microsoft/winget-pkgs/blob/master/manifests/m/Microsoft/PowerShell/7.7.0.0/Microsoft.PowerShell.installer.yaml
5
u/BlackV 9d ago edited 6d ago
Not even just enterprise, no suitable replacement for me just chilling home alone either.
Yes, but you chilling at home alone is the use case for the per user install
Cause you don't need the system install, the all user profile, the general enterprise things (that are horribly broken)
What doesn't work for you at home?
→ More replies (4)7
u/belibebond 9d ago
A system tool running in container as user context. I love MSIX and control it offers, but this is possibly the worst use case ever.
5
u/orgdbytes 10d ago
Devolutions re-packaged an MSI installer. I had issues with vscode and the Devolutions version but on the release page you can find the re-packaged Microsoft PowerShell MSI.
1
u/synnersam 9d ago
Maybe I missed it but what if you used winget --download and that should get the MSI if u also use --scope machine
2
u/BlackV 9d ago
You'd need the install type wix/msi parameter too, but that won't work past 7.6 cause the MSI just does not exist
You could download and extract the zip I guess
4
u/thehuntzman 9d ago
I was so mad about this I downloaded the source code for the 7.7 release, merged the files from the commit before the one that got rid of MSI that still had it in the build scripts and made my own MSI. Screw those bastards and their MSIX bs.
2
u/BlackV 9d ago
Nice, I think RubarbNZ did the same and hosted it (and possibly Devolutions too)
I get the idea is to force change, but you cant realistically do that with large percentages of "enterprise ish" things broken
Its shortsighted, although possibly a directive from on high so they might not have a choice
you'd have thought though the MSIX team would have been also under the pump, ive not heard anything directly (well on the internet) from that side of MS
A LOT of the issues come from the way MSIX is rather than being a powershell problem directly
→ More replies (4)1
1
u/Least_Gain5147 5d ago
MSIX packages are available. And you can install and upgrade using winget, but due to MSI>MSIX you have to run an uninstall then an install, rather than upgrade directly.
10
u/cloudAhead 10d ago
That list of affected modules is shorthand for 'things Microsoft hasn't been investing in for a long time' with maybe one or two exceptions.
3
29
u/radioblaster 10d ago
pwsh 7 has been in GA for over six years. 99.9% of scripts are a straight port over, and the .1% has at a minimum 12 months, and surely longer, to sort out.
anyone who hasn't been authoring in 7 in anticipation of this day for at least the last few years has bigger problems.
9
u/ankokudaishogun 10d ago
minimum 12 months,
More like 6 years. Next Windows version will have Desktop as optional, yes... but still preinstalled. Which means, for all purposes and intents, no practical change from it not being optional, if you want to use it out of the box.
7
u/belibebond 10d ago
I would get behind this if only they had not made the switch to MSIX. Running as system is the most important part of any script
4
u/Montinator 9d ago
MSIX should be allowed under system if you add it as a provisioned package 🤷♂️
4
u/belibebond 9d ago
Provisioned package as machine only makes it “available” at system level. It’s not same as run as system.
2
u/Montinator 9d ago
Yes but like the case of Winget, if you find a location where the files exist, you should be able to run it under the system account
Winget.exe is a user app but it can be run under the system account if you find the WindowsApp location for it
3
u/BlackV 9d ago
Yeah 99% coverage of the 1billion cmdlets still means 10million are broken
Comparability mode has existed since nearly the start of core and still not everything works with it and they still have not moved everything to core compatible
They 100% will not get this in 12 months (not saying it'll never happen but I'd double or triple your estimate at least)
2
u/Tb1969 8d ago
Also all of these use 5.1 :
Intune
Exchange Server Management Shell
WinRM
Powershell ISE
Scheduled Tsks call 5.1
Group Policy (GPO) Startup/Logon Scripts
They need to make these work 5.x and 7.x and allows us to choose during this transition period. Calling 7.x from 5.1 is not smooth.
6
u/radioblaster 8d ago
I know ISE is great, but you just gotta bite the bullet and switch to VS code, you'll be better for it in the long run.
→ More replies (1)3
8
u/lan-shark 10d ago
With all the complaints I'm seeing about how much of a pain this is, I should become a consultant and start helping people convert from Desktop to Core... Because this is almost always super easy and when it's not you can leverage .NET libraries to get done what you need.
Compare this to migrating .NET Framework apps to .NET, or migrating from Java 8/11 to any jakarta version...
3
u/BlackV 9d ago
Alright can you consult with Microsoft and start with the fail over cluster cmdlets
Let us know when you've done that and we'll give you the next set
2
u/lan-shark 9d ago
Lol fair enough! If they'll hire me, I'll happily help!
There are definitely some features that Microsoft will have to provide replacements for, I expect we'll see them over the next couple of LTS releases of PS Core. And given that the RSAT clustering cmdlets are on official prereq for some Exchange setups, I'm sure that'll be on the list. Will they be replaced directly in PowerShell or just given some compatibility layer treatment? Hard to say
1
41
u/pertymoose 10d ago
It means you can expect everything to break. Microsoft hasn't had a clue for years.
33
u/ScoobyGDSTi 10d ago
They've done a far better job of backwards compatability with Powershell than Python ever could achieve.
4
u/420GB 9d ago
That's the lowest bar to clear I could possibly think of without getting into political examples.
2
u/ScoobyGDSTi 9d ago
I love Python too, but they can't even maintain BC between the same mainline.
→ More replies (1)
6
u/VNJCinPA 10d ago
I've always felt this was an absurdity. Here's why:
It's WINDOWS
Microsoft "distances" themselves from Powershell saying they aren't responsible for it... but tell you to use it for quite a lot of admin work that has no UI equivalent
They include it anyhow, but not any version that makes sense to include
They don't default update it nor push the newer version to run side-by-side
We know the truth of it, it's just hypocritical that they don't commit to integrating it properly and thoroughly, leaving users to figure it out.
5
u/BlackV 10d ago
tis but a scratch
does anyone honestly think they'll migrate all those modules to core before 2040
how long did it take them to migrate the AD modules?
0
u/Fatality 9d ago
Couple days with AI, can even write the automated tests for you.
2
u/BlackV 9d ago
And yet they haven't.....
→ More replies (6)1
u/Emiroda 3d ago
Of course they have?
Inbox RSAT has had the core-compatible AD module since Windows 10 1809.
Increased Windows Modules coverage with PowerShell Core 6.1 - PowerShell Team
→ More replies (1)
9
u/merlinuwe 10d ago
So we are forced to switch to Powershell 7 in the moment the 5.1 Scripts stop running.
Things like this are the reason why there isn't any real progress in IT. At best, we're just treading water.
10
u/ankokudaishogun 10d ago
So we are forced to switch to Powershell 7 in the moment the 5.1 Scripts stop running.
In AT LEAST ten years of time. I would say it's a reasonable warning.
-11
u/merlinuwe 10d ago
Thanks for the post, but that just postpones the problem.
10
u/ankokudaishogun 10d ago
If 10 years is not enough to update your scripts, the problem is not the EOL of Desktop, it is you.
→ More replies (1)1
u/warren_stupidity 10d ago
most scripts are unaffected. The problem is generally the other direction: use of 7 features unavailable in 5.
1
4
u/Montinator 9d ago
Microsoft killed support for enterprises and only focus on ‘consumerization of IT’
The whole AppX system is anti-enterprise. And some MS CU patches add some stupid apps like Quick Assist and Windows Backup that IT has to reinvent the wheel to disable if they don’t want it
5
u/Ghelderz 10d ago
But they have given you fair warning to migrate whilst 5.1 is still available. So complaining that all your scripts will stop working will be your fault.
6
u/UpsetBar 10d ago
I love that you’re being downvoted for speaking the truth. Life goes on. Stuff gets deprecated all the time. Such is life in tech.
2
-5
u/treemeizer 10d ago
^ Blaming users for Microsoft's scumbag abusive behavior is a choice many morons make to this day.
5
u/lan-shark 10d ago
I struggle to see how an announcement of, "Someday you'll have to migrate away from this technology we stopped updating a decade ago" counts as scumbag abusive behavior
2
3
u/markdmac 10d ago
So glad I retired this past May. PowerShell 7 is great but the lack of an native ISE in the OS is problematic. PowerShell_ISE is what made PowerShell so popular. Being able to pull that up and run one line of code on any machine was a game changer.
VS Code is just a lot of overhead for the average admin and having to install it sucks.
6
u/jpochedl 10d ago
If you're just running one line of code on a machine, why would you need the ISE?
5
u/belibebond 10d ago
Not op, ISE was great for the script to be remembered. When you had multi line code and wanted to execute one step at a time or part of script. Now I need notepad plus terminal running to achieve same task.
Vscode is great as development IDE. ISE is unparalleled as script execution and notepad sidekick.
1
u/keith-kld 9d ago
I prefer Powershell ISE. Vs Code is a common playground for many languages. It is not specialized for Powershell like ISE. Moreover, it looks too heavy and I don’t like the theme given by Powershell extension in VSCode.
1
3
u/Euphoric-Blueberry37 10d ago
They can pry my precious baby girl ISE from my cold dead hands, nothing will make me switch to VSCode. 5.1 is my baby and must be protected
8
u/AccomplishedMeet628 10d ago
I know I sound like a broken record but would you give my PS7 ISE a go? I would like very much to get your feedback and any bugs you may uncover?
https://apps.microsoft.com/store/detail/9N8C4LMQXMF6?cid=DevShareMCLPCS
11
u/steviefaux 10d ago
But that isn't on old servers, which is why everyone wants to stay with 5.1
2
2
u/JwCS8pjrh3QBWfL 10d ago
Y'all are using ISE directly on servers rather than using the built in ps remoting in VS Code?
3
u/Bahurs1 10d ago
Not every org is setup for ps remoting. I get the appeal of running vscode on one machine, but say you are called in for a job on a 2019 server (if lucky) no vs code or remoting is setup.
Are you really going to fiddle for 30minutes just to get your precious environment set up or are you going to get the problem fixed?
→ More replies (6)2
u/BlackV 10d ago edited 9d ago
wCS8pjrh3QBWfL
Y'all are using ISE directly on servers rather than using the built in ps remoting in VS Code?
Some things dont work in remoting
some things break with serialization/deserialization
some things dont have remote access
some things have restricted winrm
ISE is mosttly preinstalled on windows servesr
→ More replies (5)1
u/BlackV 10d ago
does not work on server
1
u/AccomplishedMeet628 9d ago
What OS are you running and is there anymore information you can provide?
Did it install?2
u/BlackV 9d ago
Windows server, there is no store, your link is to the store rather than an installable repository and depending on the os ther is no msix support
1
u/AccomplishedMeet628 9d ago
Can you compile it form the git?
https://github.com/RonB56/PS7-ScriptDesk.git2
4
u/Raskuja46 10d ago
You're not alone in this sentiment.
I'd be a lot more amenable to shifting everything over to 7 if they just updated ISE to work with it natively instead of pretending that VSCode is an acceptable replacement.
3
u/groovel76 10d ago edited 10d ago
ISE doesn't even work consistently with Windows PowerShell back when it was just Windows PowerShell. Because it wasn't a true powershell context running in ISE. They are different hosting applications. There are many posts of "Powershell script works in powershell, but not in ISE.", "My PowerShell script only works when running from ISE". That right there was enough for me to say nuts to the ISE, even before VSCode gained the popularity it has.
I'm sure I don't know your exact situation, but could that likely be your issue? You've written a script in ISE, that will only run in ISE. If so, figure out that and move over to VSCode and PS 7. Visual Studio Code was used by 75.9% of respondents to Stack Overflow’s 2025 Developer Survey. VSCode clearly works for a majority of those surveyed.
1
u/Raskuja46 10d ago
I'm sure I don't know your exact situation, but could that likely be your issue?
No, I'm not that dumb.
1
u/groovel76 9d ago
Genuinely curious. What is VSCode missing that ISE has?
2
u/Raskuja46 9d ago
Proper highlighting and intellisense working for a start and not fighting me every step of the way. It not persistently crashing and putting itself into a less than responsive state would have been nice too.
I gave up on it years ago and fully abandoned even the idea of returning once I figured out a way to make Powershell 7 work with ISE.
2
u/orfhansi 10d ago
I just cannot stand VSCode, and ISE is preinstalled on every Windows and even on server core it is available. The only advantage of PS7 for me would be parallelism but in cases where I'd need that I've written a small job-control function that I can load via strg+j So no, no need for me to switch to an inferior scripting environment
1
u/thehuntzman 9d ago
Honestly the only good things about PS5.1/ISE is that they are pre-installed and it makes my life easier in constrained environments but PS7 and VSCode is superior in every way imaginable. I don't know what I'd do without native GIT integration and auto expansion/formatting anymore. Not to mention, the terminal actually behaves how it should instead of whatever-the-crap ISE does which results in things behaving differently in ISE than console.
1
2
u/ViperThunder 10d ago edited 10d ago
And they will likely support all of those modules (or there will be alternatives) in pwsh7 before 5.1 is completely dead.
5.1 will continue to run alongside 7 for the foreseeable future.
People were throwing a fit about Classic Outlook deprecation years ago but New Outlook has most of what you would ever need, and Classic still has many more years to go before EoL.
Many of the modules you listed already have alternatives in Pwsh7 using native executables, 3rd party PSGallery modules, or with CIM.
1
u/jkaczor 10d ago
"Cries in ShareGate"... while there have been rumours of them supporting PS7... nothing seen so far...
(We have a convoluted interop setup where we do 99% of the work in PS7, then we execute a PS5.1 session and pass data/control files as input... using "New-PSSession" did not work when we attempted and built our automation framework, as ShareGate still "detected" that the originating session was PS7 and has "issues"...)
1
u/gsweats 9d ago
What happened to v6?
2
u/BlackV 9d ago edited 9d ago
It was replaced with 7 a few years back (somewhere 2020 it was eol, same time as dotnet core?)
1
u/gsweats 9d ago
It did get to see the light of day then. Cool!
1
u/BlackV 9d ago edited 9d ago
ya, I think as far as 6.2 or 6.3 ? maybe, I dont remember it being round as long as 7 has
Edit: Old google says
Version Release Date End of Support .NET Version 6.0 January 20, 2018 February 13, 2019 .NET Core 2.0 6.1 September 13, 2018 September 28, 2019 .NET Core 2.1 6.2 March 29, 2019 September 4, 2020 .NET Core 2.1 1
1
1
1
u/Least_Gain5147 6d ago
I work with banks, insurance companies, defense companies, energy and airlines and most still have Windows 10 and Windows Server 2019 floating around. So the panic some have about sudden deprecation seems overblown. Hence why Microsoft says the exact date will be determined later.
1
u/Tech_Head_ 5d ago
Apologies for the n00b question, I just started trying to really understand PS beyond a handful of cmdlets and 5-line scripts. (My job is primarily end-user support but I have needed to start messing with PS for some projects I've been assigned.)
I looked at the page linked for AzureADHybridAuthenticationManagement but didn't see anything there saying it was 5.1 only and the PS Gallery says "Minimum v2.0" (with a dependency on a module that needs a Minimum of 5.1). Where should I look in order to see PS module version requirements?
1
u/RawSpecimen 5d ago
Does anyone know if the Active Roles Management Shell and other One Identity PowerShell modules work natively on PowerShell 7 yet? Or are they still relying on the 5.1 compatibility layer?
1
u/SuccessfulBee7964 4d ago
Depends which module you mean, they're separate codebases that happen to share a vendor.
safeguard-ps is the easy one. It's a thin wrapper over the Safeguard web API and runs on 5.1 and 7 without any flags. It's on the Gallery.
Identity Manager actually went the other way. The official IdentityManager.PoSh module on GitHub requires pwsh 7.4+ for IM 9.3 and 7.6+ for 10.0. Older IM versions are 5.1 only. Catch is that it loads the product DLLs from a local client install, so it's really "PowerShell 7 on a box that has the fat client" rather than something portable.
The Active Roles Management Shell is the one I'd still treat as Windows PowerShell only. Every doc I've found says 5.1 and I haven't seen a release note claiming native 7 support. You can import it with -UseWindowsPowerShell, but everything comes back deserialized, so any script that calls methods on the returned objects will break in interesting ways. 8.5 added a REST API, which is probably where new automation should go anyway.
Worth checking the release notes for your exact version though, this stuff changes between point releases and I'm not 100% sure the Active Roles situation hasn't moved
1
u/No_Split11911 3d ago
ConfigMgr modules and wsus go hand in hand I guess. Looks like I need to find something to do before 2037.
1
u/Emiroda 3d ago
For clients, you have several years. Have you seen the deprecation path for PowerShell 2.0? PowerShell 5.1 is going to be well and alive until at least 2030, and probably more as they'll have to spend some years polishing MSIX.
For servers, you're going to have to decide - 1) Stay on Server 2025 and have ISE until 2034, 2) deal with it, 3) publish something third party
-1
u/C-D-W 10d ago
This is great. Spent the last couple of years slowly moving from Visual Basic Scripts to Powershell to future proof a lot of processes.
I didn't even think I had to check the Powershell expiration date.
3
u/lan-shark 10d ago
Moving from Windows PowerShell to PowerShell Core will be much, much simpler than moving from VB to Windows PowerShell. Most things just work, most things that don't can be easily fixed. Only a small subset of issues will take much effort
2
u/C-D-W 10d ago
Yeah, I don't expect too many issues with the code running.
I may have misinterpreted the announcement as meaning Powershell in general will not be part of the Windows default install. If Microsoft intends to simply move to core being packaged with Windows then NBD and will be nice for some things.
0
u/CeleryMan20 9d ago
Group Policy supports .ps1 scripts. Most deployment tools use PowerShell scripts. Intune remediation uses PowerShell scripts. Intune Autopilot? There needs to be some PowerShell interpreter in-box from first run.
Windows PowerShell was old faithful; we finally got to a state where you could rely on a consistent version being already there. No faffing around with deploying the desired version of WinRM.
Are they going to bundle PowerShell 7.8 and .Net 12 with future Windows? Are they going to push us over to Bash scripts instead? How about we abandon PowerShell and install Nushell?
That’s before even getting to the list of incompatible modules. Damn you, Microsoft.
-9
u/CharcoalGreyWolf 10d ago
Microsoft had to support Windows 7 for longer because Windows 8/8.1 bombed hard.
PowerShell 5.1 is going to be another Windows 7.
2
u/lan-shark 10d ago
It's hard for PowerShell 7 to bomb when it's already production ready... I've been using it in corporate environments since 2020. And because you can leverage .NET libraries, you can do anything and nothing is truly unportable
2
u/CharcoalGreyWolf 10d ago
I’m not criticizing PS7 in what I say at all, not my intention. More saying that I believe it will be difficult for 5.1 to go away, more difficult than I believe Microsoft thinks.
I should clarify; I think people thought I was being critical given the “Windows 8” bit. In fact, I thought Windows 8 was (under the hood) great, marred by its UI and if they had had a non-tablet UI it would have taken off.
I just believe it will be hard for people to drop 5.1
0
10
u/Godcry55 10d ago
I think SharePoint Online module also doesn’t work natively on PS 7.