r/PowerShell • u/Borgquite • 15d 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 15d 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 13d 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 11d 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.
0
u/Least_Gain5147 11d ago
Core wasn't supposed to have full feature parity with 5.1. It has always been intended for cross platform use. What management and performance problems are you referring to?
1
u/Lost_Term_8080 10d ago
It was meant for feature parity. It was specifically planned to be made so anything can be managed from any platform. Instead development did a hard left turn into prioritizing low value developer features, largely for functions python both superior to in every way and also faster, while its primary raison detre of automation and administration were left to the low priority queue.
PS core is orders of magnitudes sorting within pipelines, performing multiple step sorting in hash tables, in fast single session web requests (there are reasons to not use connection pools when each connection has state considerations) and extremely slow JITs that cannot be fixed since Powershell 7 ignores the shared package cache and does not implement its own package cache. Absolutely anything and everything involving com or dcom is radically slower. This is due to compatibility layers. The hold outs that have stayed on com have stayed there because they are complex services with deeply nested properties and/or state that more modern APIs would make even slower.
It has completely broken package management, reintroducing assembly hell, The default settings are so bad it practically requires configuration of the ps profile that cannot cleanly be centrally managed. They eliminated msi provisioning so predeployment is no longer particularly practical and it totally eliminates running anything as system, Network service, local service, etc. To be fair, package management is so bad I've resorted to installing everything in user scope and going through the extreme annoyance of updating packages per account.
1
u/Least_Gain5147 10d ago
It was never going to have Get-Service or Get-WmiObject, etc. Windows-specific features were out of scope from day 1. That's not feature parity. Or maybe all the conferences I sat through with Steve Lee and gang were feeding us bad information.
As for the "broken" things you mention, I'm not seeing nearly that much. I have it deployed over 1500 servers in Azure and AWS, on Windows (Server and Workstation) and Linux (physical and virtual) and have had zero problems. The recent switch to MSIX is a pain, but aside from that not much. Rock solid.
1
u/Lost_Term_8080 10d ago
You could try google.
Get-WMIIObject is deprecated. Get-CIMInstance which replaced gwmi is native to PS7. Get-Service is native to PS7. The bitlocker module is native PS7. The DISM module is native PS7. The NTFS module is native PS7. It has nothing to do with what cmdlets manage.
0
u/Least_Gain5147 10d ago
I'm on PowerShell 7.7.0 on Linux and there is no Get-Service. No Get-WinEvent, Get-CimInstance, or Get-EventLog either. Feature parity literally means equal features. It was never promised. You're free to believe what you want but I'm going with what I heard from the PS team at 3 separate conferences.
If you hate PS 7 so much, stick with 5.1 and be happy.
2
1
u/TheThirdHippo 14d 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 9d 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 15d ago
They also removed .msi installs of the newest powershell versions, without providing a suitable replacement for enterprise.
37
u/Dapper_Librarian388 15d ago
Thats the most annoying part.
12
u/Mr_ToDo 15d 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 14d 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.
2
u/BlackV 14d 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?
I dont think they did
3
u/Ferretau 14d ago
I doubt they care - they will want the old OS version to die very quickly. This is jsut one way to do this. Reduce options moving forward. As they reduce staff and push into using AI to do the development then this will become the norm.
19
u/420GB 14d ago
Not even just enterprise, no suitable replacement for me just chilling home alone either.
11
u/ptr_myName 14d ago
I just use…
winget install "microsoft.powershell"10
u/420GB 14d 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 14d ago edited 11d 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?
1
u/archgabriel33 11d ago
Sooo many things https://github.com/PowerShell/PowerShell/issues/27565
2
u/BlackV 11d ago
Yes we're all very aware of what actually isn't ready,
yeah, I was specifically asking about home usage, cause for that sort thing I don't see particular blockers
Edit: oh sorry, you're not the person I replied to, you might have missed the chain
Not even just enterprise, no suitable replacement for me just chilling home alone either.
1
u/archgabriel33 11d ago
Well, I like to automate stuff on my workstation pc, and a lot of those things are blockers.
7
u/belibebond 14d 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 14d 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.
4
u/BlackV 14d ago
stay on 7.6.x, solved
1
u/Andrew-Powershell 2d ago
Yeah this is the way. Nothing wrong with being on the latest 7.6.x and wait till the next LTS release (7.8)
7.6 is LTS (3 years support) and 7.7 is STS ( 2 year support)
1
u/synnersam 14d 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 14d 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 14d 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 14d 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
0
u/thehuntzman 13d ago
Oh absolutely - my personal opinion on the matter is that AppX packages and MSIX are all immature bloated solutions looking for a problem. I have done a ton of work in the VDI space and APPX/MSIX is the bane of my existence for logon times and preloading applications to be available at runtime for users in ephemeral VM's. Yeah, let's just install a copy of every application to the user's FSLogix profile and exponentially balloon our storage requirements... I'm acutely aware of the reasons behind ditching MSI but at least make a full-featured replacement before deprecating it FFS. Even a silent install EXE would be acceptable.
2
u/BlackV 13d ago
I think they've come a long way, I remember the early days of app v and appx and spending hours fighting with AutoCAD to get it to play nice without exploding, then it all sorta became one vaguely functioning beast, then throwing vdi/fxlogic and all that in the mix, oh far out it could be painful
I think everything should have silent installs and command line installs by law
1
u/RandomSkratch 13d ago
My favourite are the ones that charge for the silent switch…looking at you npcap..
1
1
u/Least_Gain5147 10d 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 15d 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 15d 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 15d 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 14d 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 14d ago
MSIX should be allowed under system if you add it as a provisioned package 🤷♂️
5
u/belibebond 14d ago
Provisioned package as machine only makes it “available” at system level. It’s not same as run as system.
2
u/Montinator 14d 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 14d 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 13d 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 13d 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.
3
1
u/Lost_Term_8080 11d ago
Not really, VS code is terrible. It being the only option for PS 7 doesn't make it equal to ISE or not a nightmare to support.
1
u/Over_Dingo 1d ago
well I was backporting to 5.1 despite not being very fond of it, because it's in most windows machines
8
u/lan-shark 15d 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 14d 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 14d 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 15d ago
It means you can expect everything to break. Microsoft hasn't had a clue for years.
33
u/ScoobyGDSTi 15d ago
They've done a far better job of backwards compatability with Powershell than Python ever could achieve.
4
u/420GB 14d ago
That's the lowest bar to clear I could possibly think of without getting into political examples.
2
u/ScoobyGDSTi 14d ago
I love Python too, but they can't even maintain BC between the same mainline.
1
u/TaliesinWI 9d ago
But it's also pretty easy to keep multiple Python runtimes in your environment at the same time.
6
u/VNJCinPA 14d 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 14d 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 14d ago
Couple days with AI, can even write the automated tests for you.
2
u/BlackV 14d ago
And yet they haven't.....
1
u/Emiroda 8d 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
1
u/BlackV 8d ago edited 2d ago
Is that all the rsat modules, no
Some still require 5
But that's not what we were arguing, that guy was saying "it's easy just throw the AI at it and they do it in a week, and even write tests", and that person also seems have followed up with I've done it ezy pzy and the "just use graph" which just completely missed the subject at hand
Well AI is here and not all the ms modules are core compatible (yes a bunch are)
My original claim is they're (ms)not going make everything core compatible before 2040
Highly likely they depreciate windows features before converting
0
u/Fatality 14d ago
Who is they? I already did it, ezpz
1
u/BlackV 14d ago edited 14d ago
Microsoft is the they, and no they haven't, given the number of modules that very much have not updated yet (to support 7/core)
0
u/Fatality 14d ago
Just use graph powershell
4
u/BlackV 14d ago
how would graph, manage failover clustering (for example)?
there are more modules out there than just ones for managing cloud services
0
9
u/merlinuwe 15d 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 15d 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 15d ago
Thanks for the post, but that just postpones the problem.
11
u/ankokudaishogun 15d ago
If 10 years is not enough to update your scripts, the problem is not the EOL of Desktop, it is you.
1
u/warren_stupidity 14d ago
most scripts are unaffected. The problem is generally the other direction: use of 7 features unavailable in 5.
-7
1
4
u/Montinator 14d 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 15d 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 15d 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 15d ago
^ Blaming users for Microsoft's scumbag abusive behavior is a choice many morons make to this day.
6
u/lan-shark 14d 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
4
u/Euphoric-Blueberry37 15d 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 15d 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 15d ago
But that isn't on old servers, which is why everyone wants to stay with 5.1
2
2
u/JwCS8pjrh3QBWfL 15d ago
Y'all are using ISE directly on servers rather than using the built in ps remoting in VS Code?
4
u/Bahurs1 14d 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?
1
u/g3n3 14d ago
I mean by default it is enabled on modern windows servers. Granted you can use gpo to turn it off.
1
1
u/steviefaux 14d ago
Modern is the key. You'll end up in some companies that are still on outdated and no longer supported servers. That might be the issue. I've always wanted to stick powershell 7 on servers at work but understand why they weren't on it so stuck with 5.1
1
u/JwCS8pjrh3QBWfL 14d ago
No I'm going to do the work ahead of time to get my environment set up correctly.
1
2
u/BlackV 14d ago edited 14d 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
1
u/thehuntzman 14d ago
I think if you have to interactively run a powershell script (which includes RDP'ing to a server to run it in ISE or conhost) the you're fundamentally wrong about how powershell is supposed to be used and need to redesign your scripts.
Yes, I do work with people who insist on doing things this way and I don't understand it but maybe it's a knowledge issue since I've been working with powershell daily for 12+ years.
1
u/BlackV 14d ago edited 14d ago
I think if you have to interactively run a powershell script (which includes RDP'ing to a server to run it in ISE or conhost) the you're fundamentally wrong about how powershell is supposed to be used and need to redesign your scripts.
sure if you like, but there are still things that need a full session and tools that can be called form powershell that cannot be done remotely
maybe you dont need in your use cases, does not mean they dont exist
also no one is saying you cant do it your way, just saying there are use cases that prevent it and a cart-blanch "you should just use remoting" isnt always a solution
but yes I'm sure your 12+ years with powershell were very productive and full of knowledge learning, that I dont doubt
EDIT: to be clear remoting is the preferred solution, where possible
1
u/thehuntzman 13d ago
I've definitely encountered remoting serialization issues (mainly with exchange and powershell core) but fact of the matter is if you execute all of your code that depends on proper object handling remotely and then just return results to the local pipeline, you avoid a lot of this. This is really just due to how ambiguous a dotnet object can be and not the fault of powershell specifically. If you create a new object with a property that only returns a value when called then you can never properly serialize that into a remote runspace (I.e. some CIM/WMI objects). I wrote an ASP.Net core app several years ago we use at work that runs powershell reports/scripts in the browser and many of them require remoting with a service account to function properly so I understand the struggle. One app we needed data for is written in dotnet fortunately so I was able to write a powershell report that executes a scriptblock on the server via Invoke-Command to load the specific DLL I needed to get HL7 interface status and statistics, execute the proper method, convert the data I need into a pscustomobject to avoid serialization issues, then read the remote pipeline to turn it into an html table.
1
u/BlackV 13d ago
Ya one common one I do that for is paper cut, it's clean script is a bunch of invoke commands to their command line tool, does it's work, results are massaged and spits back some object to me
Just gonna go on record as saying, gawds I love ps custom objects
Problematic apps I have not used recently would be Microsoft dpm (2016?) , when you call the cmdlets with the dpm server parameter it would lose values on its returned objects, calling it via an invoke would die cause I could load it's ps snapin properly
Some cmdlets where calling a sql query to pull data back and that would also fall apart due to something funky they did with auth
1
u/thehuntzman 13d ago
Ah yeah I almost forgot about snap-ins. Legacy powershell was definitely way more temperamental. Luckily the devs also saw the issues with snap-ins and deprecated them a long time ago. Also for what it's worth, I do a bunch of SQL work in powershell and just ended up writing my own function that uses system.data.sqlclient.sqlcommand and that sorted out a lot of the issues I had in that space including using parametized queries.
1
u/BlackV 14d ago
does not work on server
1
u/AccomplishedMeet628 14d ago
What OS are you running and is there anymore information you can provide?
Did it install?2
u/BlackV 14d 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 14d ago
Can you compile it form the git?
https://github.com/RonB56/PS7-ScriptDesk.git2
u/BlackV 14d ago
Why would I do that just to run it on server?
1
u/AccomplishedMeet628 14d ago
good point, I can make an MSI if you like?
1
u/BlackV 14d ago edited 14d ago
No need, I wouldn't run something like this on server, I'd stick to the built in tools
I was only responding to your reply saying "hey use ps script desk" but you seemed to be unaware of server OSs inability to run it easily
1
u/AccomplishedMeet628 14d ago
Thank you for taking the time to converse!
I have been getting alot of negative comments and it is nice to have an actual conversation!→ More replies (0)4
u/Raskuja46 14d 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 14d ago edited 14d 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 14d 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 14d ago
Genuinely curious. What is VSCode missing that ISE has?
2
u/Raskuja46 14d 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 14d 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 14d 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
3
u/markdmac 14d 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 14d ago
If you're just running one line of code on a machine, why would you need the ISE?
5
u/belibebond 14d 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 14d 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
2
u/ViperThunder 15d ago edited 15d 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 15d 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 14d ago
What happened to v6?
2
u/BlackV 14d ago edited 14d ago
It was replaced with 7 a few years back (somewhere 2020 it was eol, same time as dotnet core?)
1
u/gsweats 14d ago
It did get to see the light of day then. Cool!
1
u/BlackV 14d ago edited 14d 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 11d 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_ 9d 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 9d 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 9d 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 8d 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 8d 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 15d 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 15d 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 15d 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 14d 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 15d 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 15d 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 14d 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 15d ago
I think SharePoint Online module also doesn’t work natively on PS 7.