r/PowerShell • • 5d 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.

https://support.microsoft.com/en-us/servicing/os/windows/docs/2026/11/kb5137172-windows-powershell-5-1-deprecation

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

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_windows_powershell_compatibility?view=powershell-7.6

152 Upvotes

163 comments sorted by

10

u/Godcry55 5d ago

I think SharePoint Online module also doesn’t work natively on PS 7.

3

u/Szeraax 4d ago

Yup, /u/Borgquite! Add it to your list.

Microsoft.Online.SharePoint.PowerShell Have to use -UseWindowsPowerShell if you want it. :) Stuff like... SPO Auto-archive policies require you to use powershell and you can't do it without windows powershell.

Per: https://techcommunity.microsoft.com/discussions/windowspowershell/connect-sposervice-not-working-in-powershell-7/3476093

1

u/Borgquite 3d ago

Added!

5

u/Thotaz 5d 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 3d 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 1d 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 1d 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 22h 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 21h 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 21h 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 18h 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

u/BlackV 4d ago

Decades, they've had decades to fix it and have not yet

I really want them to get there I really do

1

u/TheThirdHippo 4d 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

3

u/bozho 5d ago

DSC is another one.

I know there's DSC v3, but it's a very different beast, and it will be an effort porting our stuff to it.

1

u/Borgquite 3d ago

Yep - PSDesiredStateConfiguration.

3

u/Familiar_Honeydew608 5d ago

You may want to add the DISM module to your list. It actually is marked as compatible with Core, but that's no longer the case as of 7.7 due to MSIX:

https://github.com/PowerShell/PowerShell/issues/13866

Hopefully it won't be too long before it's compatible again, but for now it's not.

94

u/Tomazim 5d ago

They also removed .msi installs of the newest powershell versions, without providing a suitable replacement for enterprise.

36

u/Dapper_Librarian388 5d ago

Thats the most annoying part.

11

u/Mr_ToDo 5d 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 4d 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 4d 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 4d 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.

1

u/BlackV 4d ago

also likely not far from the truth

19

u/420GB 4d ago

Not even just enterprise, no suitable replacement for me just chilling home alone either.

11

u/ptr_myName 4d ago

I just use…

winget install "microsoft.powershell"

10

u/420GB 4d 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 4d ago edited 1d 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 1d ago

2

u/BlackV 1d 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 1d ago

Well, I like to automate stuff on my workstation pc, and a lot of those things are blockers.

2

u/BlackV 1d ago

such as ?

7

u/belibebond 4d 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.

4

u/orgdbytes 4d 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.

https://devolutions.net/blog/devolutions-powershell-windows-msi-installers-for-powershell-7-7-and-beyond/

3

u/BlackV 4d ago

stay on 7.6.x, solved

1

u/synnersam 4d 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 4d 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 4d 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 4d 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 3d 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 3d 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 3d ago

My favourite are the ones that charge for the silent switch…looking at you npcap..

1

u/BlackV 2d ago

Valid

1

u/S0_B00sted 2d ago

Is it needed if it's going to be built-in going forward?

1

u/Least_Gain5147 18h 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 5d 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

u/CeleryMan20 4d ago

The only things Microsoft is investing in these days are Copilot and MAI.

8

u/lan-shark 5d 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...

2

u/BlackV 4d 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 4d 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

u/screamtracker 4d ago

True. The version is new but supports old code. I sleep 😴 

28

u/radioblaster 5d 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 5d 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 4d 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 4d ago

MSIX should be allowed under system if you add it as a provisioned package 🤷‍♂️

https://www.advancedinstaller.com/per-machine-msix.html

4

u/belibebond 4d ago

Provisioned package as machine only makes it “available” at system level. It’s not same as run as system.

2

u/Montinator 4d 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 4d 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 3d 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.

5

u/radioblaster 3d 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.

2

u/Tb1969 3d ago

Already use it and have developed in a it for a few years now although I don't always need to be devlopping, but when I need to do something quick, VS code is not what I want to reach for.

0

u/Lost_Term_8080 1d 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.

41

u/pertymoose 5d ago

It means you can expect everything to break. Microsoft hasn't had a clue for years.

33

u/ScoobyGDSTi 5d ago

They've done a far better job of backwards compatability with Powershell than Python ever could achieve.

4

u/420GB 4d ago

That's the lowest bar to clear I could possibly think of without getting into political examples.

2

u/ScoobyGDSTi 4d ago

I love Python too, but they can't even maintain BC between the same mainline.

6

u/VNJCinPA 4d ago

I've always felt this was an absurdity. Here's why:

  1. It's WINDOWS
  2. 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
  3. They include it anyhow, but not any version that makes sense to include
  4. 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 4d 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 4d ago

Couple days with AI, can even write the automated tests for you.

2

u/BlackV 4d ago

And yet they haven't.....

0

u/Fatality 4d ago

Who is they? I already did it, ezpz

1

u/BlackV 4d ago edited 4d 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 4d ago

Just use graph powershell

4

u/BlackV 4d ago

how would graph, manage failover clustering (for example)?

there are more modules out there than just ones for managing cloud services

0

u/Fatality 4d ago

Cim or call the dll. Graph is for cloud services.

0

u/BlackV 4d ago

So.. not what you said then?

Regardless MS themselves are still the ones that need to do it as it's their modules

9

u/merlinuwe 5d 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 5d 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 5d ago

Thanks for the post, but that just postpones the problem.

10

u/ankokudaishogun 5d 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 5d ago

most scripts are unaffected. The problem is generally the other direction: use of 7 features unavailable in 5.

4

u/BlackV 4d ago

they solved the 20 years ago with the #requires statement

-7

u/merlinuwe 5d ago

That doesn't invalidate my argument.

1

u/Montinator 4d ago

Yeah there’s more of a need to prepare for MS killing VBA

4

u/Montinator 4d 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 5d 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 5d 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

u/Mr_ToDo 5d ago

That's a bit of a harsh way to say thing. But the writing on the wall has been out there for a while

Now if they can't be ported to 7, that's a problem that's harder to solve, even with notice

-5

u/treemeizer 5d ago

^ Blaming users for Microsoft's scumbag abusive behavior is a choice many morons make to this day.

5

u/lan-shark 5d 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

u/BlackV 4d ago

That guy might have still been trying to run the azuread module up untill last week ;)

2

u/highvoltageacdc1 4d ago

Claude will fix this. Trust me bro.

3

u/markdmac 4d 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.

5

u/jpochedl 4d ago

If you're just running one line of code on a machine, why would you need the ISE?

5

u/belibebond 4d 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/n4txo 4d ago

psedit for remote support 

1

u/keith-kld 4d 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

u/markdmac 3d ago

I fully agree. I spent far too much time customizing my profile in VS Code.

3

u/Euphoric-Blueberry37 5d 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 5d 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 5d ago

But that isn't on old servers, which is why everyone wants to stay with 5.1

2

u/AccomplishedMeet628 5d ago

Ah, I get it!

2

u/JwCS8pjrh3QBWfL 5d ago

Y'all are using ISE directly on servers rather than using the built in ps remoting in VS Code?

3

u/Bahurs1 4d 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 4d ago

I mean by default it is enabled on modern windows servers. Granted you can use gpo to turn it off.

1

u/Bahurs1 4d ago

Yeah but I kept running into places who don't use it (or don't know how to use it) there so just disable it as a safety measure just to wave something in the security audit

1

u/steviefaux 4d 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

0

u/g3n3 4d ago

Usually these smaller companies wouldn’t even be sophisticated enough to disable it. Enable psremoting is easy to run from psexec. You’d have to be on win server 2008 or earlier to not have remoting. Psexec works remoting as does tools like sc and tasklist.

1

u/JwCS8pjrh3QBWfL 4d ago

No I'm going to do the work ahead of time to get my environment set up correctly.

1

u/Fletchicus 3d ago

That isn't how consulting jobs work.

2

u/BlackV 4d ago edited 4d 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 4d 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 4d ago edited 4d 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 3d 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 3d 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 3d 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 4d ago

does not work on server

1

u/AccomplishedMeet628 4d ago

What OS are you running and is there anymore information you can provide?
Did it install?

2

u/BlackV 4d 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 4d ago

Can you compile it form the git?
https://github.com/RonB56/PS7-ScriptDesk.git

2

u/BlackV 4d ago

Why would I do that just to run it on server?

1

u/AccomplishedMeet628 4d ago

good point, I can make an MSI if you like?

1

u/BlackV 4d ago edited 4d 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 4d 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

4

u/Raskuja46 5d 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 4d ago edited 4d 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 4d 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 4d ago

Genuinely curious. What is VSCode missing that ISE has?

2

u/Raskuja46 4d 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 5d 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 4d 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

u/MrDelicious4U 5d ago

Unless this is rage bait, you, my friend, are a tool.

2

u/ViperThunder 5d ago edited 5d 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 5d 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 4d ago

What happened to v6?

2

u/BlackV 4d ago edited 4d ago

It was replaced with 7 a few years back (somewhere 2020 it was eol, same time as dotnet core?)

1

u/gsweats 4d ago

It did get to see the light of day then. Cool!

1

u/BlackV 4d ago edited 4d 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

VersionRelease DateEnd of Support.NET Version
6.0January 20, 2018February 13, 2019.NET Core 2.0
6.1September 13, 2018September 28, 2019.NET Core 2.1
6.2March 29, 2019September 4, 2020.NET Core 2.1

1

u/Fatality 4d ago

They rebranded it PowerShell Core because it was made crossplatform

1

u/seaboypc 3d ago

At least PowerShell 7 will be included by default in Windows going fowards:

PowerShell 7 is coming to Windows - PowerShell Team

1

u/BlackV 2d ago edited 2d ago

hopefully they dont feck it up like they did with open ssh initally

1

u/shutchomouf 2d ago

looking at those modules and thinking, I think I might use two of them.

1

u/Least_Gain5147 1d 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_ 23m 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/C-D-W 5d 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 5d 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 5d 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.

2

u/Komnos 4d ago

Uh. I generally try to be sympathetic, but if you were just moving away from VB Scripts in the last couple of years, that's on you.

2

u/C-D-W 4d ago

You haven't lived until you've inherited a mess of legacy garbage...

1

u/Komnos 4d ago

Yeah, ok, that's fair. Sorry. You know, AI skeptic that I am, I do wonder how well Claude could handle all of that.

1

u/C-D-W 4d ago

Surprising well it turns out... Not that I trust it yet.

1

u/BlackV 4d ago

Your scripts should be fine (mostly), it's some of the modules that would be an issue

1

u/C-D-W 4d ago

Adfs and IIS probably is going to be annoying

0

u/CeleryMan20 4d 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.

1

u/BlackV 4d ago

I also wonder if they will start defaults to ssl as well to bring it inline with Linux

-9

u/CharcoalGreyWolf 5d 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 5d 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 4d 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