r/sysadmin • Security Admin • 5d ago

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

185 Upvotes

106 comments sorted by

55

u/tjhensman 5d ago

Which if you run a hybrid entra environment and rotate your monthly Kerberos keys they literally say not to use ps7 and only use 5.1. So this will become interesting.

20

u/Hertock 5d ago

There’s so much stuff like this in hybrid. 5.1 is still needed

9

u/xCharg Sr. Reddit Lurker 5d ago

just go full cloud, you're missing out so much by not going cloud, all in

/s

6

u/ilrosewood 5d ago

But by laying this out they will force change. Otherwise we would just live in hybrid hell forever.

4

u/recursivethought Scolder of Clouds 5d ago

Realistically though that's just forcing us into a deeper circle of hell rather than pulling us out.

3

u/ilrosewood 5d ago

I don’t disagree. There is a way to do this stuff like having the replacements ready.

2

u/viral-architect Sysadmin 5d ago

Nah, if MS wants to own the downtime, they can have it.

It's about giving businesses no choice but to buy in or miss out.

1

u/Borgquite Security Admin 2d ago

Just added AzureADHybridAuthenticationManagement module to the module list, ta!

5

u/captaincobol 5d ago

Isn't that because 7 can't run in a system context? 

9

u/bfodder 5d ago

Of course it can. 7.7 can't but it only just released. 7.6 is LTS.

29

u/bcredeur97 5d ago

God forbid they update everything to work perfectly with 7 and make it pre installed in windows

15

u/Borgquite Security Admin 5d ago

PowerShell 7 will be pre installed in Windows at least.

https://devblogs.microsoft.com/powershell/powershell-7-coming-to-windows/

21

u/fearless-fossa 5d ago

It should've been pre-installed since at least 2022. One of the main reasons all my scripts are PS 5.1 is because getting approval for installing a new shell on all servers is countered with a lot of questions like "do we really need this?"

4

u/doubleUsee Hypervisor gremlin 5d ago

Yeah I have actively avoided PS7 because it's not running anywhere, and it seemed pointless to install it to all servers just because me and me alone want it.

2

u/BatemansChainsaw Husqvarna 5d ago

why do you have an approval process for an upgrade to a new version of software no one else uses?

5

u/fearless-fossa 5d ago

If it touches prod, it needs approval of the service and/or product owner.

If it touches dev or test, I need to run it by the heads of dev or test, and the latter one will only approve if it will also be on prod - and that's besides it being silly to maintain different capabilities in prod than in dev and test.

I could install it on servers that are only owned by my team, but besides one legacy system that serves as the testbed for scripts targeting the other windows systems, those have all been migrated to Alma Linux anyway.

1

u/BatemansChainsaw Husqvarna 5d ago

I incorrectly assumed you were the approval guy.

1

u/TheGreatNico 'goose removal' counts as other duties as assigned 4d ago

Sounds a bit like my job, the 'must get approval from the product owner' bit at least. Have you considered sticking your fingers in your ears and humming loudly and doing it anyway?
That's how we are getting, note the present progressive tense, apps off 2008 and 2012 servers.

8

u/FlyingStarShip 5d ago

🤡 from MS. You can add sharepoint online module to the list

1

u/Borgquite Security Admin 3d ago

Added!

138

u/gslone 5d ago

From my thankfully limited experience with official Powershell Modules and compatibility: Expect everything to break with no fix or clunky workarounds for years.

70

u/chiron3636 5d ago

Same with Graph

"we've replaced Powershell with something much more of a pain in the ass, please enjoy learning how to be a web dev!"

26

u/Arudinne IT Infrastructure Manager 5d ago

They keep changing so many things I've found it's actually easier to call the API directly vs using modules when I need to deal with graph.

God, these constant breaking changes with non-feature complete replacements are tiring

11

u/TheRufmeisterGeneral 5d ago

I really miss the AzureAD powershell module. It was so much better than this graph nonsense is.

Graph has its place, but it would be besides sysadmin type modules like AzureAD, not instead of it.

7

u/TotallyWorksAtWoTC 5d ago

"Those who do not understand Unix are condemned to reinvent it, poorly." - Henry Spencer

ffs will they just swap over to bash scripting, pipes and single purpose programs already or something.

1

u/hitosama 4d ago

They couldn't even get pipes right in PowerShell it seems.

13

u/fatalicus Sysadmin 5d ago

"Sharepoint Online module? yeah no, use PnP if you want to manage Sharepoint in Powershell 7.

Why would we update any of our documentation to use PnP? Sharepoint Online module works just fine."

17

u/Frothyleet 5d ago

It infuriates me that MS has documentation pointing to a community module to effectively manage so much in SPO.

7

u/braytag 5d ago

But, isn't this also with the supported version?

11

u/TheRealLazloFalconi 5d ago

PowerShell <5 has been remarkably stable for a Microsoft product. When new cmdlets were added, care was taken to make sure they didn't conflict with existing ones, and when old cmdlets were deprecated, they kept working, only giving you a warning that the new cmdlet had more features.

PowerShell 7 has adopted the move fast and break things mentality.

9

u/Misocainea DevOps 5d ago

I mourn for Powershell, it used to be so good, enshittification comes for everything I guess.

2

u/MalletNGrease 🛠 Network & Systems Admin 5d ago

Send-MailMessage is bae.

34

u/Xetrill 5d ago

MS has to make this work. Its a case of Hyrum's Law. There are millions of automation, deployment, provisioning scripts out there. Heck, I use PS to generate documentation as well.

18

u/FatBook-Air 5d ago

Unfortunately, they don't have to. Microsoft doesn't care about the Windows ecosystem.

18

u/Ghawblin Security Engineer, CISSP 5d ago edited 5d ago

Yeah, last 5 years it feels like Microsoft begrudgingly maintains Windows, only as a vector for Azure services.

Like a kid doing chores only for the allowance lol.

It's the only explanation for why windows at all levels has been so ass this decade.

8

u/Far-Hovercraft9471 5d ago

Azure is also a piece of shit to manage. There’s no escaping it

6

u/Ghawblin Security Engineer, CISSP 5d ago

It really is.

I was an AD and later Azure stan for a long time, but since AI/copilot it has been a goddamn nightmare.

Support reps fucking suck now and only give me bullshit copilot responses that take up 19 paragraphs while not addressing my one sentence ask.

The various portals break for no goddamn reason at all. The UI bugs outs all the damn time, assuming you can actually navigate the horrendous UI to begin with. God help you if you need support because you're going to get punted around 15 "support engineers" who only serve as a meat-vessel for co-pilot for the next 4 months until you give up or it suddenly works again.

I've been exploring 3rd party and open source alternatives, especially Linux. France and Netherlands are completely divorcing from Microsoft at all levels (identity, workstations, email, EVERYTHING) and switching to a self-built linux based platform. Millions of users. I hope they trailblaze for the rest of us.

7

u/Angelworks42 Windows Admin 5d ago

It's weird they actually care more about other OS's than Windows more often than not: https://learn.microsoft.com/en-us/windows-app/get-started-connect-devices-desktops-apps?tabs=windows-avd%2Cwindows-w365%2Cwindows-devbox%2Cmacos-rds%2Cmacos-pc&pivots=remote-desktop-services

For Windows app the only version that can't connect to on prem RDS is the Windows version... Even the meta quest version can...

I really wish I knew why...

4

u/Kuipyr Jack of All Trades 5d ago

They want you to pay for AVD.

1

u/redneck-it-guy 5d ago

Good point, but is it really any better on the cloud side? MgGraph PowerShell is yet another example of them not caring.

5

u/kittymoo67 5d ago

5.1 is going ot become the new windows xp if they dont

8

u/viral-architect Sysadmin 5d ago

You're never gonna beleive the version number of Windows XP...

1

u/TheGreatNico 'goose removal' counts as other duties as assigned 4d ago

Good old Windows NT with a winamp skin

1

u/kittymoo67 3d ago

oh i know, ive been in the game since pre NT

1

u/Own-Slide-3171 5d ago

They won't lol

39

u/NoDevelopment206 5d ago

The scary part is that the list at the bottom is mostly the stuff sysadmins actually touch every week, like GroupPolicy, DhcpServer, DFSR and the IIS modules. The compat layer works but it runs them through a 5.1 process in the background, so you still depend on 5.1 and just get weird type and serialization quirks on top. I would start by grepping all your scheduled tasks and scripts for those module names so you at least know how much is tied to it before the removal date gets announced.

14

u/autogyrophilia 5d ago

Yea , the reason nobody uses powershell in Linux. 

3

u/viral-architect Sysadmin 5d ago

60% of my scripts would be useless without the GroupPolicy module.

1

u/NoDevelopment206 4d ago

yeah same here, group policy stuff is everywhere. i would test the scripts on 7 with the compat layer now so you know which ones break before microsoft sets a date

2

u/glennshaltiel 3d ago

I just used IISAdministration and still use it for certificate management

10

u/Gerane 5d ago

I have a feeling there are going to be a huge number of people that get totally blind sided by this because they don’t realize how often they are using the compatibility layer.

5

u/Frothyleet 5d ago

Yeah, TIL about the compatibility layer. I was confused about the OP's list at first.

18

u/SevaraB Sr. Engineer (N+, CCNA) 5d ago

Deprecated, but ships enabled by default until removal. That’s not a transition, that’s a cutover. Freaking Microsoft…

5

u/meatballwrangler 5d ago

oh boy this will certainly go well. it's not like the only useful PS modules are all exclusive to 5.1

5

u/FlaccidSWE 5d ago

I suspect this will eventually really suck...

5

u/OGUnknownSoldier 5d ago

I just have to say, thank you for saying deprecation. All of my freaking co-workers call it depreciation and seem unable to comprehend the difference. Drives me bananas lol

2

u/Far-Hovercraft9471 5d ago

Just call it DPed for shorthand like a normal person

15

u/Euphoric-Blueberry37 IT Manager 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

19

u/Turak64 Sysadmin 5d ago

I thought the same, then I switched. Get with the times granddad, vscode is much better

9

u/root-node 5d ago

VSCode is great, just not for PowerShell.

Intellisense is broken and just doesn't work.

2

u/FireITGuy JackAss Of All Trades 3d ago

What is broken?

I love ISE for convenience as a pre installed tool, but I switched to VSCode years ago and haven't run into anything that is doesn't handle properly once you have the powershell extension installed and v7 on the system.

4

u/Turak64 Sysadmin 5d ago

Then don't use it, just code

1

u/TotallyWorksAtWoTC 5d ago

did you install the correct code extension? Works perfectly fine for me.

1

u/root-node 5d ago

There is only one PowerShell extension from Microsoft. Unless you know of any others

4

u/TheRealLazloFalconi 5d ago

VSCode is pretty rad, but it's way too heavy of a client, plus it's more webslop bullshit. ISE was a nice, somewhat lightweight client that just did ps scripting. I still use it sometimes when I'm just writing a quick one-off script.

1

u/sirjaz 2d ago

Someone made a new version of the powershell is that works with 7. Arg I can't find the link at the moment

3

u/P1nCush10n 5d ago

Guess it’s time to republish all my azure runbooks as 7.x and see what breaks. Yay. More billable hours!?! Ugh.

2

u/Fuzzy_Paul 5d ago

A other fine product gone. The native ide was a good one. The ps7 ide is not there and the vsc is no good at all with ps7. I already converted the stuff to ps7 but not happy with it. The shitshow will start in a couple of years all over. What's new in the deteriorating eco.

2

u/tmontney Wizard or Magician, whichever comes first 5d ago

I mean, I feel like this has been the unspoken truth for years now. I'm not sure the last time PS51 got a feature update. Since PS7 is replacing it automatically in the future, this is a much welcome change.

4

u/Appropriate-Border-8 5d ago

I installed PowerShell 7 and lost the ability to use the Run As Another User function on my desktop. I had to get around that by using a jump server VM and logging into it with the account that I wanted to Run As. I can still use Run As with 5.1.

4

u/xCharg Sr. Reddit Lurker 5d ago

Huh? Just plain regular shift-click on pwsh.exe doesn't allow to run it as another user? Or what do you mean?

There are plenty of reasons to be dissatisfied with these news but that - doesn't sound like a powershell version issue at all.

1

u/Appropriate-Border-8 5d ago

Correct. It doesn't bring up the usual context menu, like it does with PowerShell 5.1 and other executables. Maybe it's because it's a Windows Store app. I will dig a little deeper into this when I find some spare time. 🙂

4

u/Dal90 5d ago

FWIW, I use the following two when I need to (1) launch another powershell window as the account I can be a local admin on my PC then (2) launch an Administrator powershell window so my local admin account then can actually do admin level things:

In current non-privileged account shell:

 runas /user:<redacted domain>\<redacted desktop admin> pwsh.exe

In new shell:

pwsh -command "start-process pwsh -verb runas"

Now you should have a third shell up.

1

u/Appropriate-Border-8 5d ago

Not as convenient as Shift + right-clicking and using the "Run As" function. Even using my jump server is simpler than that.

1

u/maevian 4d ago

Add a function to your psprofile and it becomes a lot easier to

1

u/Appropriate-Border-8 4d ago

I am going to try uninstalling 7 and re-installing it from an MSI package that download from Github.

2

u/Appropriate-Border-8 3d ago

I uninstalled PowerShell 7 and installed this version, after verifying the download hash.

https://github.com/PowerShell/PowerShell/releases/tag/v7.7.0

Now I can right-click and select Run As Another User, without jumping through hoops. And, if I find that it's required, run it again As Admin:

PS> Start-Process powershell -Verb runAs

2

u/Sinsilenc IT Director 5d ago

Yep cannot do that with store apps...

2

u/Frothyleet 5d ago

I don't think you have to install it as a store app, do you? I use Winget.

1

u/Appropriate-Border-8 5d ago edited 5d ago

I use to install it from an MSI package but, they don't offer that anymore. For now, I will use my jump server, while at work and the desktop, while at home. Logging in as the account that I want to use (and running as Admin too, which is often required). Come to think of it, it may have started when I switched to Windows 11 last year.

2

u/xCharg Sr. Reddit Lurker 5d ago

They do offer MSI packages, I downloaded one just a couple hours ago from Microsoft official docs

3

u/lacrimachristi 5d ago

Just an FYI, MSI packages are deprecated so MSIX only packages after 7.7 and beyond:

https://devblogs.microsoft.com/powershell/powershell-msi-deprecation/

2

u/xCharg Sr. Reddit Lurker 4d ago

I mean, fair, but at the same time 7.7 is currently just a preview. So effectively for now MSI is there for latest version that's worth installing and using.

1

u/krazykat357 5d ago

An aside but I am despising the multiple different ways to install the same application, that (demonstrably) impacts its functionality. WHYYYYYY

1

u/xCharg Sr. Reddit Lurker 5d ago edited 5d ago

Incorrect, has nothing to do with powershell 7 - it is purely an issue existing on workstation or whereever you launch powershell 7. Or you don't launch powershell7 but something else that hosts powershell7

Here's example from server 2019 - need to hold shift while right clicking of course https://imgur.com/a/fynP87O

Installed manually from msi, if that matters.

upd out of curiosity installed pwsh 7.6.6 (msi) on my w11 enterprise 26h2 machine and believe it or not - works just fine too https://imgur.com/a/Cmlspe6

same thing if you create a desktop shortcut or shift right click on pwsh.exe in "C:\Program Files\PowerShell\7"

3

u/BlackV I have opnions 5d ago edited 4d ago

you installed the MSIX/Store Version thats why

install the MSI version you'd have been OK

1

u/Appropriate-Border-8 3d ago

I uninstalled it and re-installed it from the downloaded ZIP package. All good now. 🙂

2

u/Background-Art8014 5d ago

will microsoft magically fix any of our thousands of broken scripts after migrating to pwsh 7? yeah...didn't think so.

1

u/zenmaster24 2d ago

They never fix anything to do with breaking changes

1

u/TotallyWorksAtWoTC 5d ago
winget install --id Microsoft.PowerShell --source winget

1

u/viral-architect Sysadmin 5d ago

Whatever the lowest version that comes with Windows and gets Windows Updates is what goes on the servers. We don't install Powershell 7 on servers because it has it's own update cycle that we would also have to manage seperately.

If it works on 5.1, chances are, it'll work in 7+, so that's my baseline.

2

u/NoDevelopment206 4d ago

that baseline rule makes sense for servers. one thing i would still check is the modules that only work through the compat layer, since those can act different even when the script looks fine on 7

-10

u/angrydave 5d ago

Ya’ll still using powershell 5.1?

17

u/Borgquite Security Admin 5d ago

Yes, and just to warn you - if you’re using any of PowerShell modules at the bottom of the post, you are too, even if via the PS7 compatibility layer.

13

u/SuspiciousOpposite 5d ago

Yes because I can't use the ADFS, DHCP, or WSUS modules with PS7 lmao.

7

u/itskdog Jack of All Trades 5d ago

That's the default terminal application in Windows, and it's what Intune used for it's script deployments.

6

u/jakubmi9 5d ago

Yes, exclusively. Running scripts from network locations is still broken. The GitHub issue is 4 years old and there's no work done.

3

u/Gerane 5d ago

You have a link to this issue?

4

u/jakubmi9 5d ago

I do. I was checking today if they finally fixed it. It's a non starter at our company, since we have a central repository of admin scripts that we are accessing from client machines.

7458

12336

2

u/Frothyleet 5d ago

I'm not saying it's an acceptable issue, but can you just pull the script repo or individual scripts locally when you execute them?

4

u/Xenoous_RS Jack of All Trades 5d ago

Absolutely

1

u/dathar 5d ago

Barely at my job. SaaS for days, end users with a gigantic fleet of Macs and not much Windows and Linux. I just have a fleet of utility Linux VMs and PS 7 modules I made doing day to day stuff. I am fine if they don't break Invoke-RestMethod and Invoke-WebRequest. They already broke -followrellink

2

u/EAT-17 5d ago

Obligatory fuck Microslop from my end.

0

u/[deleted] 5d ago

[deleted] — view deleted comment

1

u/TotallyWorksAtWoTC 5d ago

ISE was depreciated/ignored. VSCode + Powershell extension is the new way of doing this.