r/PowerShell • u/KevMar Community Blogger • 2d ago
News Why developers hate PowerShell
https://powershellexplained.com/2026-11-24-why-developers-hate-PowerShell/?utm_medium=post&utm_content=rpowershell&utm_source=redditThis 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
59
u/aguerooo_9320 2d ago
Top quality u/KevMar, I'm hoping more people will read beyond the title and a quick diagonal glance, to understand that this is actually a helpful article for a developer starting to work with Powershell, to ease their experience.
17
u/KevMar Community Blogger 2d ago
Thank you. I appreciate it. It was hard to strike the right balance with this one. Still not sure if I got it.
I think the calling functions section captures the heart of it the best.
7
u/aguerooo_9320 2d ago
It is a step by step helpful journey explanation from the POV of a developer, absolutely top notch!
With this opportunity, thank you for all your blog posts, it's already 8 years since I've read the first one!
15
u/Solonotix 2d ago
I hit almost every single thing you've mentioned, lol. As a developer on Windows, PowerShell is my go-to for scripted actions, and I have been bitten so many times by these various gotchas. I like to think I'm on the other side of this bell-curve, though, where I'm now starting to use these eccentricities rather than being caught unawares.
For instance, the gotcha about multiple return values in a function scope. That's just how pipelines work. You want to make a lazy-ish pipeline? Just allow a value to be returned without a variable to capture it (and no return keyword). On the caller side, they can abort that execution with ... | Select-Object -First ... and you didn't even need to account for it.
The exception there, of course, being that you might have a disposable resource like an open file or connection. The gotcha I then hit (feel free to add this to your article) was learning that the End { ... } block does not work like you might expect, since internally PowerShell is calling the blocks Begin { ... } then Process { ... } then End { ... } with an implicit End { ... } block if you omit all of them. Side note, the special function keyword Filter has an implicit Process { ... } block instead. Anyway, all of that to say that a disposable resource can now be safely handled in a Clean { ... } block which will always execute upon exit, even when something else aborts the processing of a function/command.
This was a really big lesson for me when I was trying to do a TestRail upgrade (that royally sucked). Had to do a lot of database calls and relate it back to the file system, and I had already uninstalled all of the crap needed to complete their install instructions (e.g. Python 2.7, JDK 8). So, I dropped down into the .NET side of things and got into using [System.Data.SqlClient]. My first hitch was that lingering open cursor from one function call, and it was going to prevent subsequent queries from being run because the result set hadn't been disposed of. The Clean { ... } block was only added in PowerShell v7.3 so I shudder to think what the code would have looked like prior to this. I probably would have dropped into a C# class file and imported it with Add-Type but that begets its own realm of troubles lol
6
u/KevMar Community Blogger 2d ago
Nice call out. I absolutely need to find a place for that in my article.
5
u/Solonotix 2d ago edited 1d ago
Do you happen to have any articles covering the weirdness and use cases for the various common types in PowerShell? I tend to use explicit type annotations for things, and I've noticed differences in how some things are handled, as well as what AI agents recommend.
For instance, the
[ordered]@{}type. I usedGet-Memberon it, and it said it was Something like[Systems.Collections.OrderedDictionary](might have the wrong type), but it behaves differently from that explicit type. It's like[ordered]is its own discrete thing that works with the object syntax. This of course is different than the default result of the declaration@{ ... }which is[System.Collections.HashTable]as well as the ubiquitous[PSCustomObject]@{ ... }5
u/KevMar Community Blogger 1d ago
I don't recall if my hastable article covers some of that. I remember fighting with
[ordered],[hashtable], and$PSBoundParametersnot having consistent methods across all three for checking if a key exists at one point. I think my solution was to cast everything toIDictionaryat the time. I definitely useIDictionaryinstead ofhashtablewhen strongly typing parameters because of that.4
u/surfingoldelephant 1d ago edited 1d ago
but it behaves differently from that explicit type
Because
[ordered]is special-cased in the parser (similarly with[pscustomobject]and[ref]).There's a semantic check that prevents anything other than a hash table literal following it because it's not a real type in Windows PowerShell. It's kinda like an attribute (but not really) that tells PS to produce a case-insensitive
Collections.Specialized.OrderedDictionaryinstance. That dictionary type by default is case-sensitive.
[ordered]was added as type accelerator in PS v7, hence you can do[ordered]::new()in that version, which is the exact same as[Collections.Specialized.OrderedDictionary]::new(). But with conversion expressions, you can still only do[ordered] @{}because the semantic check that prevents anything else is still in place.Also, side note, there are slightly different conversion rules depending on whether you type-constrain or cast. For example,
$var = [bool] ''is fine, but[bool] $var = ''is not. Something to watch out for if you type-constrain a lot.
25
u/AngryPets 2d 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").
7
0
u/caderoux 1d 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.
5
u/me_again 1d ago
I think PowerShell has a lot in common with JavaScript or bash. They are the default languages for certain kinds of activity, but as languages they have quirks which are now unfixable due to back-compat concerns and which grate on developers who want a "Real Language" suitable for writing large systems.
I still remember discovering that @[] -eq @[] is neither true nor false, but an empty array 🤯. Which is explained clearly in your doc but I still maintain is a design flaw.
2
u/SupremeDictatorPaul 1d ago
Honestly, a lot of array handling in PowerShell is problematic. Like, if a function returns an array, that array gets returned. Unless the array has one object, in which case it gets unrolled. Which means every time you use a function that returns an array (outside of a pipeline), you have to wrap the function in an array to ensure that later code that expects an array doesn’t fail. There are a few situations where it simplifies code a little, but in nearly every instance for me it’s just been a hassle.
2
u/dodexahedron 1d ago edited 1d ago
There's also the -NoEnumerate switch, which is for exactly that. But using it can also be clunky.
Also, note that passing an array object through the pipeline as input to the next pipeline stage enumerates by default but, if passing that object as an explicitly named parameter (even from the pipeline), it stays an array, always.
Strongly type your parameters and write pipeline-friendly code in the first place (i.e. make use of begin, process, end, and clean as appropriate - including in ad-hoc/ in-line script blocks), and it won't be an issue.
2
u/KevMar Community Blogger 1d ago
Also, note that passing an array object through the pipeline as input to the next pipeline stage enumerates by default but, if passing that object as an explicitly named parameter (even from the pipeline), it stays an array, always.
My solution for this single item over pipeline vs passed as a parameter is to always loop over it. There are still some behavior differences to watch for when running in the pipeline vs not.
process { foreach ($item in $InputObject) { # do stuff } }1
u/dodexahedron 1d ago
That's one way. It is a lot cheaper to check first and only enumerate if you need to, as ahown in one of the about_Functions docs. Otherwise, if it is in a pipeline and you unconditionally use a foreach, you'll be creating an enumerator for one item, as many times as there are items in the pipeline, because process gets called for each one, one at a time.
You might find this pretty cool, too, for some functions.
1
u/ankokudaishogun 9h ago
Also, note that passing an array object through the pipeline as input to the next pipeline stage enumerates by default but, if passing that object as an explicitly named parameter (even from the pipeline), it stays an array, always.
Yeah, that's incredibly counterintuitive. And not highlighted enough in the docs.
1
u/surfingoldelephant 1d ago edited 1d ago
Like, if a function returns an array, that array gets returned.
No, it doesn't. Each element gets emitted individually, even if there are multiple. And the original array is lost. When there are multiple, PowerShell collects them in a new array and uses that as the result (assuming the result is being assigned to a variable).
# Each element in the int array gets emitted individually. # PS collects them in a *new* object array. The original int array is lost. $x = & { $a = [int[]] (1, 2, 3); $a } $x.GetType().Name # Object[]When there's only one emitted object, then yes, the result is just that.
If you're the function author,
Write-Output -NoEnumerateor using a throwaway array is how you guarantee array output so the caller doesn't need to wrap in an array themselves.# Array created by the unary comma gets discarded, # so output is the original int array. $x = & { $a = [int[]] (1); , $a } $x.GetType().Name # Int32[]Generally though, I'd avoid doing that as it breaks PS's item-by-item processing, which is the main reason for "unrolling" arrays to begin with. Functions should generally be emitting objects individually as soon as they're available and not collecting all objects upfront, so that they can participate properly in a pipeline (which is how almost every command shipped with PS behaves).
0
2
2
u/MasterChiefmas 1d 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?
2
u/KevMar Community Blogger 1d ago edited 1d ago
That's fair. I am still leaning on the average Windows user experience more than the specific developer experience that shouldn't be assumed to be using Windows by default anymore. My original intro was the function calling experience but I felt that stuff was universal enough that I should start with it. All of these are not my complaints so much as pain that I have seen others experience.
But I want to highlight that the Execution Policy is just a speed bump. You can't persist a change to the Execution Policy in a managed corporate environment, but you don't need to be admin to bypass it. I call out that you can specify the policy when you launch PowerShell. I don't mention that you can also change it for your current session as a user:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassAnd if the script you want to run is self contained, you can just copy/paste it into the terminal. It's a false sense of security at best.
Edit: I stand corrected, it can be restricted by Group Policy: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.6#use-group-policy-to-manage-execution-policy via
Turn on Script Executionfor all scopes without the ability to override it. If you only setMachinePolicyandUserPolicyby Group Policies without that setting, PowerShell displays an error message that the scope is set by a Group Policy if you try to change it but you can still set it for the process scope in that scenario.1
u/MasterChiefmas 1d ago edited 1d ago
I am still leaning on the average Windows user experience more than the specific developer experience that shouldn't be assumed to be using Windows by default anymore.
Ok, if that's the case though, the title of your article is mis-matched from your target audience. You're article literally mentions devs. I don't know if it's fair to call a dev an average Windows user, though I wouldn't also assume a dev knows all the ins and outs an experienced admin would either. Although...I guess now that I think about, maybe I read the title differently then you intended. I don't know if I was an average user if I'd be overly interested in why Dev's don't like it. I'd expect a Dev that was considering or had some work coming up in PS, to be interested in it.
the execution policy stuff
I don't believe this is true if it's blocked at the domain level, but I could be wrong there. I don't have a domain I can test it on anymore.
You should get a deny error if the domain policies are being applied and enforced.
I'd be interested if someone does have a domain running they can test it for us on, if they are able to block it, probably at machine and user policy levels, if it prevents using bypass.
1
u/ScoobyGDSTi 1d ago
Ah no, you can absolutely enforce execution policy and prevent standard users from modifying it.
2
u/dodexahedron 1d ago
Linux has mandatory access control mechanisms, as well, and they can absolutely be applied to powershell, though of course that is orthogonal to ExecutionPolicy itself.
It's just that nobody understands them or uses those things.
Those things being SELinux, AppArmor, etc.
But yeah - the privilege models in POSIX systems, even with MAC in use, truly are extremely primitive and rudimentary in comparison to NT's model.
8
u/CaelFrost 2d ago
"Output is objects" - yes, the selling point I love as a developer. But sure, you go wild with your regex/grep.
2
u/MonkeyNin 23h ago
Combining objects and regex is amazing
1
u/CaelFrost 23h ago
Agreed, i love being able to access the objects, manipulate and combine them into other objects, including using regex to do it
5
u/paintsbynumbers7 19h ago
Why would you hate on a tool, thats just junior talk. If it doesnt match your purpose, you find a different tool. You’re not supposed to enter a relationship with it.
4
u/Alternative-Tie-4970 21h ago
I formerly had a dayjob in a company that uses almost exclusively windows.
Since I was in an administration department I had extensively made use of powershell.
Powershell, in my eyes, went from cryptic to actually really... well... powerful. It has a genuinely fantastic workflow which a conventional shell lacks, and while I still prefer conventional shells for my day-to-day usage, I will never complain about having to use powershell.
1
u/cottonycloud 1d ago
Excellent post! Touches on most of my pain points, coming from Java, C, C++, Python. PS7 has fortunately cleaned up many of my old gripes but there are still some.
- Classes and importing are a big one. There really should be only one way to import that includes classes. I cannot think of a reason why I would not to import classes as well.
- Dynamic scoping - Sorry I just don’t like it lol. If I wanted that variable, I’d have declared it as a parameter.
- Null and errors - To me, undeclared variables should always throw an exception and I shouldn’t have to toggle strict mode.
- Aside, I wish VSCode (I guess PSScriptAnalyzer) highlighted automatic variables and could discover undeclared variables.
- Null-coalescing with variables often involve enclosing the variable as such ${var}?.method(). A bit annoying for sure.
- No “using” statement to enclose variables. Just a minor gripe here.
1
u/KevMar Community Blogger 1d ago
I'm good about programming defensively against dynamic scope in my own stuff. It is so ingrained into my coding style that I forget about dynamic scope. Well ... until I run into someone else's code that abuses it.
And its not consistent in that Modules get their own scope (I think its actually a closure) and it doesn't pass it through to other Module calls. So things like
-WhatIfdon't consistently work when one module calls another module.2
u/surfingoldelephant 1d ago edited 1d ago
Aside, I wish VSCode (I guess PSScriptAnalyzer) highlighted automatic variables
PSSA isn't responsible for syntax highlighting. It will however flag assignments to automatic variables by default. See
AvoidAssignmentToAutomaticVariable.Invoke-ScriptAnalyzer -ScriptDefinition '$input = 1' # RuleName Severity ScriptName Line Message # -------- -------- ---------- ---- ------- # PSAvoidAssignmentToAutomaticVariable Warning 1 The Variable 'input' is an automatic variable that is built into # PowerShell, assigning to it might have undesired side effects. If # assignment is not by design, please use a different name.Syntax highlighting comes from the TextMate grammar defined here. PS's TextMate grammar is pretty lacking, but it does actually include a rule for highlighting automatic variables. Most themes don't bother with that granularity, hence you typically end up with the same color for all variables. So you just have to configure a different color yourself. Here's the rule:
support.variable.automatic.This article explains how to do it in your VS Code settings.
1
u/cottonycloud 1d ago
Thank you! I just assumed there wasn't any option to highlight automatic variables lol.
1
u/scrumbud 1d ago
Good write up. I've been using powershell for years, and didn't know about the comparison operators functioning as filters.
1
u/KevMar Community Blogger 1d ago
It might be worth revisiting my "Everything you wanted to know" posts where I do the deepest of dives into the most basic of things in PowerShell.
2,200 words on the
switchstatement sounds like a lot, but did you know the PowerShellswitchis a loop that can have multiple cases regex match each line of text read directly from a file? Everything you ever wanted to know about the switch statement.
3
u/smallestworry 1d ago
This explains why I hate powershell even though I really really need it. So happy to have Claude to write it for me, saves hours of stupid syntax debugging.
1
u/PinchesTheCrab 2d ago edited 2d ago
My biggest issue is the I have to do everything myself because of the lack of security tooling for PWSH compared to other languages.
When I download java libraries I can use a proxy that scans them for vulnerabilities. I can look at a version history with known vulnerabilities and scan results. With all the vulnerabilities AI has discovered lately we have daily standups to discuss security scan results and establish remediation deadlines.
There's no equivalent for PWSH. I host a nuget feed in our repository where I can publish modules and proxy the psgallery, but no security scans are happening on the random third party modules users are installing. It's the wild west, and I think we're one major incident away from cutting off external module downloads entirely.
PWSH lives between scripting and programming and I love it, but it's definitely not a first class citizen among programming languages.
1
u/KevMar Community Blogger 2d ago
Yes, PowerShell package management in general leaves a lot to be desired.
1
u/PinchesTheCrab 2d ago
It's not just that though, there's various apps that scan our code for various coding vulnerabilities we've written, like passing unsanitized user input to another command.
1
u/neotearoa 1d ago
Kevin, I'm a genius dumbass. I've failed up in it my entire career; held back by crippling ADHD and boosted by methylphenidate and the late age diagnosis chip on both shoulders. I'm currently squashing 50 pounds of shit into a 40 pound bag using AI and so so many times have I been stung by the fact that llms have been trained on not powershell.
That section alone was almost more significant than the article in its entirety for me.
As I read each paragraph, I chuckled a little thinking yup, been bitten by that before when writing pre AI.
Then quietly another more recent and less decipherable feeling of familiarity arose that was immediately unlocked at the training paragraph.
Cheers from the top of the world, in the best, least drawn country you know.
1
u/KevMar Community Blogger 1d ago
Thank you. It was the realization that AI was making these same mistakes that pushed me to finally write this post.
0
u/neotearoa 1d ago
Kevin, ngl, I felt smart when the penny dropped. My suspicions were correct but my knowledge was lacking. So thank you. I immediately turned the page into a skill and have been using it since.
This is for a personal project to help me bridge the gap between my chemical disadvantage and my persistent refusal to be bound by it.
I'll still die as dumb as I was born, but you know I'll be just that much happier for this.
Chur.
1
1
u/AGsec 1d ago
This is great for non developer too. I am really trying to internalize "The PowerShell way" and this is a good reference to not only understand "the way", but see how it's done in the developer world and why. One of the harder things about PowerShell is that a PowerShell power user can be very different from most other power scripters and developers, so this article serves as a handy cheat sheet that bridges the gap when talking with others who are not PowerShell centric.
1
u/wonkifier 1d ago
One other one that has eaten so much of my time over the years until I figured out how to make it work
Adding an index entry to a list. This one works:
GOOD:
$i=1;Get-ChildItem | Select-Object @{Name="index"; Expression={($script:i++)}}, Name, PSIsContainer, LengthNote the () around the increment
--
Without that, the index is empty.
BAD:
$i=1; Get-ChildItem | Select-Object @{Name="index"; Expression={$script:i++}}, Name, PSIsContainer, Length--
Similarly, without the scoping, it doesn't work either, even with the parens. This just shows "1" for each row
BAD:
$i=1; Get-ChildItem | Select-Object @{Name="index"; Expression={($i++)}}, Name, PSIsContainer, Length--
Remove them both, and you're back to empty
BAD:
$i=1; Get-ChildItem | Select-Object @{Name="index"; Expression={($i++}}, Name, PSIsContainer, Length--
It's extremely unintuitive
1
u/chrisdrobison 1d ago
Powershell definitely has its eccentricities for sure. But, as a developer, PS is often my go-to because it is a full programming language in a scripting language and to me that is huge. Every time I use something like Bash, I forget it is mostly just an orchestrator of running different processes to get things done--which is fine, but it's a total pain when I do actually need something more complex.
1
u/Aecnoril 1d ago
Funny, currently building a WPF app to automate Active Directory processes through a Powershell Command builder. And I can recognize some of these struggles I had when I first went to powershell. Luckily that's all way behind me now.
1
u/ankokudaishogun 1d ago
I'll be honest, the only thing I got out of the post is "Developers hate reading the docs. And *nix alias for Powershell cmdlets are stupid."
...I absolutely agree on the second part.
1
u/surfingoldelephant 1d ago
Regarding "Verbosity is a feature", I've seen a lot of PowerShell naysayers conflate script writing best practices with shell usage. They believe PowerShell's verbosity is mandatory, including in the shell, and get discouraged from actually giving it a proper go.
Once they realize a) you don't have to use the shell like you'd write a script and b) there are actually benefits to embracing verbosity in script writing, I've found they're a lot more amenable to giving PowerShell a fair chance.
1
u/MonkeyNin 23h ago
For the "string is never null" part, there's an IsNotBlank function
if( -not [string]::IsNullOrWhiteSpace( $FilePath ) ) {
# create file except when it's whitespace or null or empty string
}
# or default values when blanks/nulls/whitespace are used
if( [string]::IsNullOrWhiteSpace( $UserName ) ) {
$UserName = 'John Doe'
}
# this is more reliable that using `??` and `??=`
# only works for literal null values. empty string, or ansi escapes won't trigger it.
$UserName ??= 'John Doe' It's quite reliable for blankable values:
[string]::IsNullOrWhiteSpace( @() ) # true
[string]::IsNullOrWhiteSpace( $null ) # true
[string]::IsNullOrWhiteSpace( '' ) # True
[string]::IsNullOrWhiteSpace( "`n" ) # true
[string]::IsNullOrWhiteSpace( "`nbob" ) # false :)It's a nice filter for filenames, usernames, etc that shouldn't only consist of control characters.
1
u/RobertDeveloper 3h ago
PowerShell breaks with every convention imaginable, thats why developers struggle so much with PowerShell. Not using comma as parameter separators is devious.
-7
u/Medium-Comfortable 2d ago
lsexists, but it isn’t thelsyou know.
That's where I stopped reading. No shit Sherlock, a different script language behaves differently.
6
7
u/aguerooo_9320 2d ago
This is Kevin Marquette, he's aware of it all, just explaining from the point of view of a developer.
1
u/chrono13 1d ago edited 1d ago
But that's not the command. The command is Get-ChildItem. GCI has expected behavior. LS in powershell does not have the expected behavior in its output or flags.
This is an alias, but an alias that doesn't take the ls flags. Which means despite being cross-platform, And the command existing on both systems, it breaks depending on which operating system it's ran on. A better example is how this aliasing breaks the expected behavior of curl.
To put it another way, if I were to simply list the contents of a folder as the only command in powershell with a single flag, and it's working on Linux, BSD and Mac, it will break on Windows. That's not expected behavior for a cross platform scripting language.
1
u/BlackV 1d ago
Medium-Comfortable
lsexists, but it isn’t thelsyou know.That's where I stopped reading. No shit Sherlock, a different script language behaves differently.
Sounds like maybe you should have read more then, sounds like that was exactly the point they were making....
1
u/neotearoa 1d ago
Bruh, this is nature or evolution at play. Be a gentle god and let it work itself out 🙏.
Remember that you can lead a horticulture, but you can not make it think.
-2
u/VirtualDenzel 2d ago
Its just that paupershell (as we call it) likes to make its own rules. Has documentation that does not get updated. Graph changes weekly and is a mess.
Sure its handy to do some with powershell cmdlets. Ht for windows cmd.exe was just as good.
Compared to almost all other languages i ever coded in is paupershell a joke.
0
u/Szeraax 1d ago
This is a very good writeup, KevMar. You correctly hit some of the big pain points with classes.
If we were still in 2022, I'd probably yell about you not griping about method chaining on the annoyances for developers trying to use classes. :P But in 2026 where AI is writing a lot of the code, its just as easy to let the AI write the code with all the needed methods fully flushed out.
-2
u/Dave_A480 1d ago
Because the whole idea of an object oriented CLI scripting language is nuts.... And if you really want that there is Python (but you're a sadist)....
The Unix CLI (simplified to bash, although ksh or any of the Bourne variants fits) is much simpler, has more powerful text processing functions, and aside from some historical curiosities (ls instead of list because 2 bytes better than 4) overall makes more sense....
That said, it's a better way to interact with VMWare than the pointyclicky web interface, for interactive administration tasks (Ansible is better for automated/repetitive ones).....
And the best way to interact with Windows Servers for interactive administration
-2
u/anarchyusa 1d ago
I think PowerShell really was broken out of the gate with it’s Verb-Noun i.e putting the method before the object then supplying other methods downstream. That’s not an opinion or just a product of habituation. Keeping to one hierarchy is objectively better from an objective, neurological standpoint.
-7
u/JoelyMalookey 1d ago
Terrible article nitpicking 101 stuff?? Consisting it can use any .net library it’s just a bad take article
30
u/kagato87 1d ago
I've converted my dev team. They've learned that, while.it is an interpreted language, it's also a fully capable object oriented language. Like a JIT language except it doesn't actually need any compile at all, and is crazy easy to debug.