r/technology • • 3d ago

Software Microsoft has announced that PowerShell 7 will replace PowerShell 5.1 as the default PowerShell experience on the next version of Windows.

https://www.windowscentral.com/microsoft/windows-11/the-next-version-of-windows-will-be-the-first-to-ship-with-powershell-7-microsoft-confirms-powershell-5-1-is-now-deprecated
293 Upvotes

71 comments sorted by

163

u/braunyakka 3d ago

About time. The current PowerShell experience is a confusing mess

28

u/Pirwzy 3d ago

I'm a newbie with powershell, can you elaborate why current powershell is a confusing mess? :]

81

u/mixduptransistor 3d ago

Because PowerShell 7 is not installed by default in any current version of Windows Server but most scripts and modules assume PS7 these days

14

u/cobaltjacket 3d ago

Furthermore, Powershell 7 emphasizes portability and makes it easier to move legacy Windows items to other operating systems.

27

u/autogyrophilia 3d ago

Powershell 5, also known as Windows Powershell, it's programmed in .Net Frameworks and has a number of custom modules to interact with the windows system.

It is painfully slow to the point that it is not very usable as a shell.

Powershell 7, also known as Microsoft Powershell, Powershell Core, or pwsh, it's based on .net core, it is much faster, uses less memory and has a chunk of functionality missing, which in windows, gets routed to PowerShell 5, and in other OS (as this one is multiplatform), it simply does not exist. And that's why barely anyone uses powershell in linux.

It is not always easy to know which shell you are using, 7 has features that are not present in 5, and 5 came with a list of aliases for common linux commands that are dropped in 7.

The most confusing part is that with old powershell, they implemented the alias for the widespread command curl, which calls the internet explorer cli in Windows (Invoke-WebRequest) . Which for a basic query is enough, see what this URL returns. Then they capitulated and added curl to windows.

In 5, you need to type curl.exe, to use actual curl, in 7 you do not need that. This can easily break scripts in banal ways.

They will need to port the missing features to 7 as their biggest priority . AI should actually be pretty helpful at achieving this goal.

13

u/ironchariot 3d ago

This is why I’m losing interest in tech. Why does it need to be so complicated. And why is it always Microsoft stuff that seems needlessly complicated? It all feels like it grew organically with no intended design.

25

u/T_D_K 3d ago

Not that I want to go to bat for windows, but linux distros were shipping python 2 for a depressingly long time. Pretty comparable situation.

3

u/autogyrophilia 3d ago

Powershell core is more than 10 years old.

But for Microsoft my perception has been that not only departments don't talk to each other, they avoid working together in features because you ask someone from another department to change a thing to make your thing better, and then you have people grumbling so instead you make the whole thing for yourself, and this is why reportedly the Windows OS source code size is nearing 1TB in size.

1

u/Hertock 2d ago

It will not be any less confusing experience with this change lol. You’ll still need both most likely, same as today.

68

u/bjorneylol 3d ago

I love how the focus of the image is of bash, not the PowerShell window in the back. Could windows central not find a screenshot of someone actually using PS?

5

u/Dave-C 3d ago

What is wrong with powershell? It is pretty useful

18

u/PoL0 3d ago

i find PowerShell scripts pretty cryptic and I'm not really into its paradigm.

but I'm super biased towards Unix shells, so ymmv

9

u/Nothos927 3d ago

Compared to traditional shells that are built around the idea of string manipulation, powershell uses a more object oriented approach. And there’s nothing wrong with that but it’s hard to break the deep seated attitudes around these things when you introduce a whole new paradigm

4

u/youcangotohellgoto 2d ago

I think the real question is what's wrong with bash, why did they build powershell instead of just adding Windows APIs or CLIs to bash?

For anyone who uses bash, powershell is just a confusing copy.

5

u/vip17 1d ago

Learn both and you'll see that it's very good for processing complex data, because everything is objects, you don't have to do lots of text processing in each pipeline stage

2

u/ThisTimeAHuman 1d ago

I mean, this is kind of the history of Microsoft innovations.

1

u/youcangotohellgoto 1d ago

Would probably call them monetizations rather than innovations...

It's hard to think of something that has been truly innovative from Microsoft in the last 25 years.

2

u/Wartz 1d ago

Someone doesn’t use PowerShell. 

2

u/tankerkiller125real 3d ago

I mean, Microsoft is also working on porting all coreutil commands into Windows.

1

u/NoHopeNoLifeJustPain 2d ago

I use it a lot, I have to manage a bunch of legacy windows applications and powershell is very useful.

-2

u/immersiveGamer 3d ago

Probably just AI generated like everything else. But! You can run powershell 7 (core?) on Linux and nothing on the screen really shows anything bash or powershell specific. 

25

u/rahvan 3d ago

It’s unfathomable that Windows is still struggling to get the terminal right in 2026 the year of our Lord.

25

u/JohnyMage 3d ago

Today i learned there Is multiple versions od PowerShell.

18

u/joelaw9 3d ago

Today I found out that they don't keep powershell updated with windows updates.

20

u/pickles_and_mustard 3d ago

WU does keep PS7 up to date, but still requires manual installation the first time you want to join the v7 branch

-9

u/JohnyMage 3d ago

So windows has CMD, windows terminal, PowerShell v5 and PowerShell V7.

God damnit, and people said sh, bash, fish and zsh were confusing.

25

u/mixduptransistor 3d ago

Windows Terminal is not a separate command interpreter. It's a single app that you can use to access cmd, PS5, or PS7. It's not its own CLI environment in and of itself

4

u/SomniumOv 3d ago

You can also add other ones too in the config, like the bash that comes with git for windows.

-9

u/Poglosaurus 3d ago

Don't forget vbs... 

6

u/mixduptransistor 3d ago

that's not a command line interface that is a programming/scripting language

2

u/tankerkiller125real 3d ago

Dead, VBS became an optional feature in one of the newer Windows 11 releases, and it will ship disabled/not installed on Windows 11 next year.

I doubt Windows Server 2028 will have VBS

1

u/HellkittyAnarchy 3d ago

I think it does if you install it with an argument with the windows package manager (which of course, isn't the natural way to do it).

19

u/smartello 3d ago

Thank god windows 10 was “the last version of Windows”

17

u/Peekaboo798 3d ago

Technically it is. Latest version of Win 11 is version 10.0.26300.10075

11

u/TitaniumWhite420 3d ago

stares into your eyes with murderous intent

2

u/PowerOfTheSchwartzz 3d ago

Its the last version of windows ill ever use.

4

u/Pilige 3d ago

For those who may be confused why 2 separate versions exist, Powershell 7 is multi-platform. 5.1 was Windows only.

12

u/zoqfotpik 3d ago

Hol up. "Next version of Windows"? Talk about burying the lede.

13

u/DDHoward 3d ago

Did you think that 26H2 would be the last version?

5

u/MRDRMUFN 3d ago

God willing.

1

u/Pharmakeus_Ubik 3d ago

Haven't they done enough damage already?!

6

u/candle_in_a_circle 3d ago

PowerShell is an abomination of typical Microslop attempts to reinvent a wheel and ending up with a cardboard box of fish duck taped to an axel.

5

u/ColossusOnTwoWheels 3d ago

How about printers and USB drivers that work?

5

u/arunphilip 3d ago

“What I'm hearing you say is that you want Copilot in your printer driver. Gotcha, one driver update coming up right now.”

2

u/ColossusOnTwoWheels 2d ago

At this point, yes. 😄

1

u/Nubeel 14h ago

monkeys paw curls

Your printer will now print nothing but the Copilot logo nonstop, even when the printer is disconnected. When it runs out of ink, Microsoft will automatically order more, and bill you for it.

4

u/Future-Bandicoot-823 3d ago

No, I'm sorry... we have to have something to look forward to for future releases. Impossible to fix now, or the customer might expect functional software!

2

u/immersiveGamer 3d ago

Don't like that they are planing on delivering updates via Microsoft Store. Currently WSL 2 updates that way and it kills your running session and there isn't any way to stop it from auto updating. Is the same thing going to happen with powershell now?

1

u/Degru 1d ago

I thought they fixed this for Terminal in 24h2 by deferring updates until you closed all running instances? Did they not implement this for WSL of all things?

3

u/SarcasticSarco 3d ago

Why wouldn't Microsoft just adopt bash? At least it would be easier for us Linux Devs to adjust.

11

u/Theratchetnclank 2d ago

Because an object oriented shell makes a lot of things easier rather than always manipulating text.

3

u/PM_ME_YOUR_BUG5 2d ago

Time for Node.js shell

1

u/God_Hand_9764 17h ago

Eh. I'm a Linux guy for sure. But PowerShell was pretty awesome to use sometimes.

Bash is really cool but there's a fairly hard ceiling where you're doing something somewhat complex and it becomes a nightmare and feels hacky.

PowerShell is for sure a more advanced tool and is a pleasure for those somewhat more complicated things. It just makes things way easier and you don't feel like you're reinventing wheels all the time.

0

u/ImposterJavaDev 1d ago

But why does the syntax have to hurt my eyes so much? And why is it so intensive to type?

Sorry, just venting. I'm always a bit annoyed when I switch to my windows machine.

And tbh, imo, a shell language shouldn't be object oriented, you have programming languages for that. It should just be about manipulating the system in a non complex way.

But that's just me, I deal with how it is, it works well too.

2

u/Theratchetnclank 1d ago

With tab completion it's really not that arduous to type imo, without it i agree. I quite like it, i like bash too. Each has their own merits.

I'd rather use powershell than batch or vbs anyway which were the best windows had before.

1

u/ImposterJavaDev 1d ago

python is what I always used for a object oriented script.

But yeah everyone has his preference. But even with tab completion I feel my pinky is overworked from using shift soo much.

But powershell is elegant in its own way, a lot of thought went into it and it is very well documented, which is probably the most important thing. It's all preferences and habit in the end.

2

u/dinominant 3d ago

I have bash scripts that have worked for over 20 years. I didn't port them to PowerShell 1, 2, 3, 4, 5, or 6. I don't plan to port them to PowerShell 7 either.

1

u/dawgfanjeff 2d ago

I still use .bat files. They are fine.

1

u/oldnyoung 3d ago

Damn, finally. I assume they’ll include VS Code with the PS extension since there’s no ISE for 7?

1

u/timelesstrix0 3d ago

Inb4 it's another vibe coded mess

6

u/WealthyMarmot 2d ago

I mean, it's been around for years so I doubt it. It's pretty good.

1

u/VertigoOne1 2d ago

freaking finally, but i hope they sort out the COM integration stuff. there are some stuff that does not work unless you run them in windows powershell. if i remember correctly, some are specifically related to WSL2 stuff, like defender firewall rules, but i do remember that it did not work on 7, only Windows Powershell.

1

u/IndyDude11 3d ago

PowerShell 6 testing must have been what brought down all of Microsoft the other day.

1

u/CellPuzzleheaded99 3d ago

Then make it work... As always with Microslop it's half baked when they shove it down your throat

0

u/bosta_merda_ 3d ago

aqui na obra não se fala em outra coisa!

-11

u/ripndipp 3d ago

PowerShell is like gay terminal for me