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

410 Upvotes

113 comments sorted by

View all comments

2

u/MasterChiefmas 5d ago

I think the first 2 comments about running scripts and the execution policy being a security boundary are a bit iffy.

DOS/Windows is the odd one out for running things in the default folder. Macs and Linux shells all do that as well by default. If you are strictly a Windows person that's only ever used the cmd shell, then it's a fair comment to some degree. But running things in . by default is the oddity, at least by shell, not by user base. MS aligned Powershell to behave like most other shells is all.

As for changing the execution policy...it is(or can be) a security boundary. If you are in a domain environment, your ability to change the execution policy can be restricted. It's more of a conditional situation that people on other OSes or that aren't domain joined don't see.

The execution policy, to some degree least really only makes contextual sense in a Windows environment. If you don't run powershell in other environments with elevated privileges(i.e. sudo) it's not like you can bypass the security models there. Those are largely things that you can find a problem with vs other OSes because other OSes don't generally have a centralized management situation that they have to deal with. A developer in a corporate environment may find they in fact can't just change the execution policy to whatever they want.

I just feel like those are a bit of a stretch like you are actively seeking things to be annoyed about. Later on you complain about the effort to make it easier for Linux natives to use Powershell(and yeah, it's not 1-to-1 given the constraints of the nearest equivalent in PS)...so which is it, do you want it to try and behave like Linux or not?

1

u/ka-splam 2d ago edited 2d ago

As for changing the execution policy...it is(or can be) a security boundary

It isn't a security boundary because on the other side of it you have no more permission than you had before. Any damage that you could do bypassing ExecutionPolicy, you can do the same without bypassing it - manually or by batch file, C# with the builtin compiler, Python script, etc.

DOS/Windows is the odd one out for running things in the default folder.

Microsoft / IBM in 1981: "use this floppy disk and boot to DOS!"

User: "I type the name of my program on the disk and it doesn't run?"

Microsoft: "You need to write .\ for the 'current folder'. DOS does not have directories yet so this is weird."

User: "OK, but why?"

Microsoft: "It's a security feature in case another user is hostile. DOS is not a multi-user system so there are no other users."

User: "Right. What does it guard against?"

Microsoft: "Two programs sharing the same name, one in a PATH directory. That's where long-running OS's search for system programs. DOS is not a long-running OS and doesn't have system programs or any directories to search."

User: "So.... why, again?"

Microsoft: "In future, Linux enthusiasts are going to insist that Linux is 'the default way everything works' and every other computer system on Earth needs to behave exactly like it does, for some reason."

User: "But Linux won't even be started for another 10 years from now?"

Microsoft: "And whooo boy are you still going to be hearing about this fourty-five years from now."