Comparing PowerShell to Linux User Manipulation
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
I get it's not as fast as when working wiht a text-based OS and text based shell, but those things are not doing or needing to do all the crap that's behind the curtain, such as dealing and working with .NET framework, registry, com, wmi, adsi, Office, SQL, REST, etc etc... what I had in the screen shot earlier.
Those are things you only need once in a while, not all the time. Why do you need SQL or Office or .NET when not working with those things? You don't.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
Finally, I also get "it should just work like Linux". But the fact is, it isn't Linux. It's something else. And like it or not, it's built the way it is, and it isn't going away.
The point was... it has problems. It is slow. It has design flaws that aren't being addressed and cause it to be noticeably cumbersome for simple tasks - slow to the point of being slow from a human perspective. Like it or not, that's a problem with PowerShell. That Microsoft has worked their butts off to come up with excuses to justify it being bad today isn't relevant. The point that started all of this is that for shell tasks, PS is noticeably slow, and it is. Very much so. And easy to demonstrate.
The long discussion came from you trying to say it wasn't slow. Then we had to break down what the shell was versus what are things called by it, what is being measured, etc. Then we started looking at the comparisons of shells.
The point was not that PowerShell isn't needed, nor that Microsoft hasn't worked to create requirements to justify it, but simply that it doesn't do shell duties as well as alternatives and is very slow when it shouldn't be.
-
Meh, regardless of what it is and what you tihnk of it... I really enjoy scripting, automating, and building with it... It's fun, and it's a nice experience for me working with objects and all. I don't use it for simple tasks, so maybe that's why.
I'm not saying I enjoy it more or less than something or anything else, I'm just saying I really enjoy working with it and want to take it further. It is in the future of all that is Microsoft, so why not?
I also will be doing more with Node and JS, and I am pretty sure Java. I'm super excited about that.
-
It also seems that most of the justification for PowerShell isn't that it does a good job, but that there isn't something better. A lack of something better doesn't make what remains "good". That it is "all we have" is fine, we are stuck with it. But you should never argue that something is "good" or "fast" based on no one bothering or caring to make something good or fast for the platform. Bash competes against many other shells, including PowerShell, on Linux and comes out looking good. Not the best, zsh is definitely better and fish is good, but it comes out looking pretty decent. It blows PS away when compared apples to apples - calling the same tooling. It's faster and easier and more efficient (and stable.)
Bash is considered "good" when competing in a field of shells trying to unseat one another. Bash itself unseated csh, ksh, tcsh, and just shell over the years. It's held up to scrutiny in an open field.
PowerShell has had to have its ecosystem locked to it to even get people to use it. It didn't work on existing platforms and to be usable needed the platforms to conform to its quirks and problems. It only gets used from a lack of alternatives, not by beating them in competition. From a software perspective, it uses a monopoly stance to get used, rather than allowing quality to rise to the top.
I think what is important is understanding that PowerShell is not impressive overall. It has some cool features, it is improving, but overall, it's a pretty weak shell offering and there is a reason that it is available universally yet people think it would be silly to adopt it anywhere that it is not required - it just isn't good enough to compete in any open competition. It's not even close to being competitive. Accepting that it has to be used, sure, but that was never in question. Likewise, I think it has to be accepted that it's just not a good shell and reflects extremely poorly on the Windows ecosystem that this is the only viable alternative provided after decades of better options being known about and eschewed.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
Meh, regardless of what it is and what you tihnk of it... I really enjoy scripting, automating, and building with it... It's fun, and it's a nice experience for me working with objects and all. I don't use it for simple tasks, so maybe that's why.
You could always do that on Linux, too. Or on Windows. That's not new to PowerShell. There have long been more mature tools across the ecosystems for that kind of stuff.
It's not wrong to do those things, it's just not what PowerShell, or any shell, is meant for.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
I'm not saying I enjoy it more or less than something or anything else, I'm just saying I really enjoy working with it and want to take it further. It is in the future of all that is Microsoft, so why not?
It is not, and Microsoft would not agree with you. It's not even Microsoft's tools for making large automation. It is Microsoft's shell, it is for shell functions.
-
@scottalanmiller said in Comparing PowerShell to Linux User Manipulation:
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
I'm not saying I enjoy it more or less than something or anything else, I'm just saying I really enjoy working with it and want to take it further. It is in the future of all that is Microsoft, so why not?
It is not, and Microsoft would not agree with you. It's not even Microsoft's tools for making large automation. It is Microsoft's shell, it is for shell functions.
MS is putting it's full weight behind PowerShell, it's not going away. I read PowerShell support is a requirement in the MS Common Engineering Criteria. Also, that vendors other than Microsoft have strong support for PowerShell such as Dell, IBM, Cisco, Citrix, VMware, NetApp, and dozens more.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
I also will be doing more with Node and JS, and I am pretty sure Java. I'm super excited about that.
I think this shows where we come to a mismatch. When talking about shells, your mind goes to application development languages, rather than OS interaction components. Obviously the two touch and are both programming. But shells have one specific purpose - to be a human interface to the operating system, not to be a programmatic one. Yes, most shells can be programmed, but that is a secondary function. The term "shell" means that that cannot be its primary function.
Node, JS, Java... these are non-shell programming languages. Akin to C#. All great stuff, and likely this shows that it is programming, not systems administration by hand, that you find interesting. The problem is... PowerShell and BASH are tools that exist to managed by hand, they are human interface tools (with light automation opportunities.) They are both programmatic shells, but the intention in any shell is that anything programmatic is an afterthought, for minor "one off" automation tasks. Not for building tooling.
In the Linux ecosystem, this is decently well understood and people never use Bash or zsh or tcsh to make "tooling" beyond a few lines of code, it's just silly. In Windows, for some reason, probably decades of lacking even good shell tooling, people are very often trying to use shells to do the work of full programming languages and building their automation with tools meant for humans.
In reality, using PowerShell to build automation tools is a lot like making a macro to automate the Windows desktop GUI shell. Can you do it? Absolutely. Is it silly? Absolutely
If you want to use .NET and all those Windows "hooks" that you can't use from Bash, Microsoft makes C# and F# specifically for that purpose.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
MS is putting it's full weight behind PowerShell, it's not going away.
Yes AS A SHELL. MS is no way is trying to replace C# or F# with PowerShell. Not in the least.
-
@scottalanmiller said in Comparing PowerShell to Linux User Manipulation:
That it is "all we have" is fine, we are stuck with it.
Right, it IS the only option. VBScript is depreciated, which was already anemic in terms of things it could touch, making it a poor glue for connecting systems and processes.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
@scottalanmiller said in Comparing PowerShell to Linux User Manipulation:
That it is "all we have" is fine, we are stuck with it.
Right, it IS the only option. VBScript is depreciated, which was already anemic in terms of things it could touch, making it a poor glue for connecting systems and processes.
VMScript was never available as a shell. It was an extra language to fix shortcomings in the CMD shell of the time.
-
@scottalanmiller said in Comparing PowerShell to Linux User Manipulation:
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
MS is putting it's full weight behind PowerShell, it's not going away.
MS is no way is trying to replace C# or F# with PowerShell. Not in the least.
Nobody ever said, implied, or even hinted that....
-
It's not just a Shell, i'm beyond that. it's also a scripting language.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
@scottalanmiller said in Comparing PowerShell to Linux User Manipulation:
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
MS is putting it's full weight behind PowerShell, it's not going away.
MS is no way is trying to replace C# or F# with PowerShell. Not in the least.
Nobody ever said, implied, or even hinted that....
You did. You mentioned the tasks of C# and F# and said that PS was the future. But it is not, it's not replacing those pieces. It's future is the same as its past... just a shell, not as the automation language.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
It's not just a Shell, i'm beyond that. it's also a scripting language.
No one said it was JUST a shell, only that that was its primary purpose. Read what is written, don't look for implications. PowerShell is a shell, you can't be good as a shell AND good as a scripting language. PS actually fails at both, part of what makes it poor. More of an issue, Windows needs a good shell and that's why PS being its shell of choice is a problem.
You keep using that you can script with PS to justify it being bad. But for a shell, it doesn't stand up. And as an automation language, it isn't as good as Microsoft's choice languages of C# and F#.
-
Bash's strengths come from how little scripting language it has, for example. Bash is a shell that does shell duties extremely well and is totally garbage for scripting. That's what Python, Perl, and other languages are for. They are amazing scripting languages that are not shells.
On Windows, what people wanted was a good shell. What MS provided was PowerShell. If PS is supposed to be for scripting, that's a bigger problem because we still need a good shell. But we already have good programmatic support, so what problem is PS solving? None, it seems, just creating problems.
-
@scottalanmiller said in Comparing PowerShell to Linux User Manipulation:
That's what Python, Perl, and other languages are for. They are amazing scripting languages that are not shells.
Yeah MS knows this and is why they have both PowerShell and Python runbooks for automation in Azure.
I was looking at converting some things to Python actually, at first just to see if there were any performance differences in those.
If so, I was going to do PowerShell / Python both side-by-side, but haven't said anything yet on here. There are some PowerShell-only requirements I have, so there's no getting away from that. But Python in the very short-term is probable.
-
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
I was looking at converting some things to Python actually, at first just to see if there were any performance differences in those.
I would not expect so. Or if there is, PS is probably the faster.
Almost certainly for a tiny script, Python will be faster because it is so light. Once you do any amount of stuff PS is likely to be faster because of its JIT compiler.
-
@scottalanmiller said in Comparing PowerShell to Linux User Manipulation:
@Obsolesce said in Comparing PowerShell to Linux User Manipulation:
I was looking at converting some things to Python actually, at first just to see if there were any performance differences in those.
I would not expect so. Or if there is, PS is probably the faster.
Almost certainly for a tiny script, Python will be faster because it is so light. Once you do any amount of stuff PS is likely to be faster because of its JIT compiler.
Some of it is with some large API handling between MS Graph and third party services that I haven't mentioned anywhere. Would that make a difference? Do you think it's worth comparing?
-
What's odd is that MS seems to push so much on "scripting" on one hand, but is so completely dedicated to compiling on the other. I think it shows a big lack of coordination from their engineering teams. Their programming team makes C# and F#, both of which are fantastic, but they offer no scripting platform.
Then on the other side of the house they have scripting-only from PowerShell and CMD.
Where is the enterprise scripting platform that we would expect? It seems like a massive gap in their programming platforms.