r/PowerShell • Community Blogger • 17h ago

News Why developers hate PowerShell

https://powershellexplained.com/2026-11-24-why-developers-hate-PowerShell/?utm_medium=post&utm_content=rpowershell&utm_source=reddit

This is a post that I have been thinking about writing for a very long time now. I find that developers struggle with PowerShell in a very different way that the sysadmin learning to automate. They bring intuitions and assumptions with them from other languages that catch them off guard when they skip over the documentation. In this article I try to capture some of those experiences and misunderstandings.

I cover a lot of ground in this one: running scripts, execution policy, aliases, objects and formatting, calling functions, output and return values, unrolling, operators, case sensitivity, type conversion, truthiness, strings, scope, automatic variables, paths, encoding, errors, native commands, and classes.

While this one is targeting Software Engineers more then Systems Engineers, I would still appreciate your feedback and stories of your own frustrating experiences.

Thank you, -Kevin

240 Upvotes

72 comments sorted by

View all comments

22

u/AngryPets 16h ago

Kevin - this is GOOD STUFF(TM).

Initially, my thought was that a better title might be "Common Pitfalls for Developers Learning PowerShell" or ... "How PowerShell works for Developers".

As a C# developer, learning PowerShell was ... trivial. EXCEPT for all of the damned exceptions to what I EXPECTED would be the case for a LANGUAGE (PowerShell) ultimately 'written' on .NET and/or with the idea of being able to natively run .NET code, return objects, and the likes. So much of what I would've expected and or took for granted ... just wasn't the case. Causing plenty of lost hours, a bit too much cursing, and serious frustration with PowerShell.

And you've nailed it. Learning PowerShell as a developer? meh. Actually using it, you're in for a few shocks. That'll piss you off.

Like ... left-side-wins. For a C# developer that's not just blasphemy, it's unthinkable (a design goal of C# was to get rid of that 'holdover' from C++) - so left-side-wins is SO counter-intuitive.
Arrays, yeah, more like duck-typing from JS. Confusing and odd - compared to your expectations. WICKEDLY delicious once you get what's going on AND what you can do.
Can't tell you how many times I LOST an hour here or there (back before AI made a LOT of this shite trivial) cursing PowerShell cuz it just swallowed my well-named $input variable.

And I'm guessing that SysAdmins, 'scripters', and other folks familiar with "shells" are likely going to poo-poo a number of the details you've outlined here.

They're not your audience. And yeah - this all stuff I've HATED about USING PowerShell until I've been able to make most of it second nature (and migrate fully to the "Dark Side").

6

u/KevMar Community Blogger 13h ago

Awesome. This was one of the reactions I was hoping to get.

I have so many style rules to mitigate these things that I sometimes forget why I have the rule until I break it and I am quickly reminded as to why.

0

u/caderoux 6h ago

Also the incompatibilities and quirks between Powershell versions. I literally have a test suite for 5 and 7 because Claude knows how incompatible they are and that everything needs to be tested against both. Developers will be fine and then send a script to a different machine and have all kinds of problems without doing that.

1

u/KevMar Community Blogger 3h ago

I have been developing in compatibility mode for so long that I forget how big of a difference there can be. I haven't really adopted the new stuff in 7, yet I have stopped using all the stuff in 5.1 that isn't in 7.1 a long time ago.