Shell Speeds, Bash and PowerShell





  • Nobody puts PowerShell on Linux to manage only Linux. It's put there to automate MS/Windows management or to automate MS/Windows and Linux management together more efficiently from the same tool. If it's just Linux, BASH all the way. However, you cannot really efficiently manage Windows and the whole Microsoft world from BASH.

    Until you can efficiently manage and automate everything Microsoft with BASH, PowerShell is the best and only option to do it from a single point.

    What good is measuring speed differences when there is no choice in management shell and real automation or scripting language for the Microsoft world. If you cared most about performance and cost, you wouldn't be usimg Windows or PowerShell in the first place. But if you are anyways, you need a good too that interfaces with everything the right way efficiently and effectively. Not just Windows, but all of Microsofts products or many of them together, typically... Windows, server, AD, Office, all server roles and MS management products (SC), all that jazz.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Nobody puts PowerShell on Linux to manage only Linux.

    Actually they do, but then once they realize how poor it is, they don't bother.

    People all want BASH on Windows specifically to manage Windows. The idea that PS is on Linux to manage Windows makes no sense to me, why would anyone do that?



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    However, you cannot really efficiently manage Windows and the whole Microsoft world from BASH.

    Actually, we found in this context that it was better than PowerShell for exactly that.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Until you can efficiently manage and automate everything Microsoft with BASH, PowerShell is the best and only option to do it from a single point.

    One of us is missing something here. What is on your local machine should not affect what is done on the remote machine. Outside of the Windows world, for example, you use bash on Linux to manage tcsh on macOS. Or zsh on Linux to manage bash on Linux. Like it just doesn't matter.

    When we do PowerShell on Windows, we use it to talk to bash on Linux. To manage PowerShell on Windows, we can do it from either Bash or PowerShell on Linux. But Bash seems to do it way better.

    Why do you feel someone would want PS on Linux to talk to PS on Windows? What do you feel it does better than Bash does in that context?



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    What good is measuring speed differences when there is no choice in management shell and real automation or scripting language for the Microsoft world.

    There is. There are real choices, people just promote PS hard by not talking about them. But there were strong options before, and there are strong options now.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    Actually they do, but then once they realize how poor it is, they don't bother.

    Not for any kind of production use or anywhere it would make sense.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    Actually they do, but then once they realize how poor it is, they don't bother.

    Not for any kind of production use or anywhere it would make sense.

    But only because it is bad. You act like they wouldn't want to, but if PowerShell was any good, of course they would want to. For exactly the reason that Windows people have long wanted Bash. Not because Bash is great, just because it is better than what they have.

    If PS was as good, or better, than common Linux options, people would want it for whatever reasons make it better.

    You are acting like wanting PS on Linux is crazy. But if PS was made well, it wouldn't be crazy, but rather obvious. Obviously we want the best shell wherever we are.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    The idea that PS is on Linux to manage Windows makes no sense to me, why would anyone do that?

    It's put there to automate MS/Windows management or to automate MS/Windows and Linux management together more efficiently from the same tool. If it's just Linux, BASH all the way.

    Cost savings.

    Performance.

    More Interactivity with other services like node.js for example when dealing with things, such as API.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    The idea that PS is on Linux to manage Windows makes no sense to me, why would anyone do that?

    It's put there to automate MS/Windows management or to automate MS/Windows and Linux management together more efficiently from the same tool.

    This is simply not true. That is why people stopped putting it on. In the beginning people were hoping that PS would actually be good. Then they learned that it wasn't. Only then, solely because PS isn't very good is it limited to this one use case. But even that doesn't really make much sense, because what does it do that Bash doesn't?



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Cost savings.
    Performance.
    More Interactivity with other services like node.js for example when dealing with things, such as API.

    Those can't be reasons since cost is zero either way. Performance favours Bash. And there is zero interactivity benefits.

    I don't understand this list. None of it can apply to the scenario. Both interact the same on Linux. Both interact the same remotely.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    @Obsolesce said in Shell Speeds, Bash and PowerShell:

    However, you cannot really efficiently manage Windows and the whole Microsoft world from BASH.

    Actually, we found in this context that it was better than PowerShell for exactly that.

    Example of easily and efficiently managing numerous MS services, products, etc from BASH better than PowerShell? Would you use BASH on a Linux box to get some local users from a mobile windows device and put that data into AD and set some Outlook policies in Group Policy.... whatever I didn't give much thought.

    What do you do in BASH to manage Windows typically... (that isn't just calling PS anyways).



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Would you use BASH on a Linux box to get some local users from a mobile windows device and put that data into AD and set some Outlook policies in Group Policy.... whatever I didn't give much thought.

    Absolutely. I talk about this all of the time. that we do specifically similar stuff to this via bash because we have found it to be dramatically simpler and faster than PowerShell. So this, 100%, this is where bash shines.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    What do you do in BASH to manage Windows typically... (that isn't just calling PS anyways).

    Of course you are CALLING PowerShell. The question was only about calling it. Whether you have PowerShell on Linux or Bash on Linux, when you manage Windows you are just calling PowerShell.

    Same as managing from one Linux box to another. That's Bash or PowerShell calling Bash or PowerShell remotely.



  • So given that the question that you were answering was... "Why do you feel that using PowerShell on Linux is better for managing remote Windows than using Bash for the exact same process"... it's a weird response to have given.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    @Obsolesce said in Shell Speeds, Bash and PowerShell:

    What do you do in BASH to manage Windows typically... (that isn't just calling PS anyways).

    Of course you are CALLING PowerShell. The question was only about calling it. Whether you have PowerShell on Linux or Bash on Linux, when you manage Windows you are just calling PowerShell.

    Same as managing from one Linux box to another. That's Bash or PowerShell calling Bash or PowerShell remotely.

    This whole thing in my mind was about you using solely Bash to interface with Windows and MS products and services , no PowerShell involved in any way or fashion on either end. What a god damn waste of time.



  • See this is the thing, PowerShell on Linux doesn't do Bash's job locally as well as Bash. Nor does it do Bash's job remotely as well as Bash. But the logic that no one would put PS on Linux for the former, because it sucks, should then be applied to the latter because the logic matches.

    But clearly, MS is making PS for Linux and people are deploying it for some reason. The logic being provided can't be used consistently, so it can't be correct. There must be a desire for PS... either because it does something actually well. Or a hope that it will.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    This whole thing in my mind was about you using solely Bash to interface with Windows and MS products and services , no PowerShell involved in any way or fashion on either end. What a god damn waste of time.

    Shells don't work that way. What we use on Linux implies nothing about what we use on Windows or vice versa. In fact, we use PowerShell from Windows to manage Bash on Linux 10,000% more than we use Bash on Windows for that.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Would you use BASH on a Linux box to get some local users from a mobile windows device and put that data into AD and set some Outlook policies in Group Policy.... whatever I didn't give much thought.

    Absolutely. I talk about this all of the time. that we do specifically similar stuff to this via bash because we have found it to be dramatically simpler and faster than PowerShell. So this, 100%, this is where bash shines.

    No, Bash doest directly interface natively with many MS products and services without help. You are using PowerShell or other packages to do it. This isn't what the conversation was supposed to be about, somehow you slipped that in there.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    What a god damn waste of time.

    This is why I asked over and over and over why you kept stating that using PowerShell on Linux mattered. Why would we ever talk about that and mean PowerShell on Windows? That would make no sense.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    No, Bash doest directly interface natively with many MS products and services without help.

    Neither does PowerShell when it is remote. Hence why you chain of logic isn't making sense. What it interfaces with has no relevance here.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    @Obsolesce said in Shell Speeds, Bash and PowerShell:

    No, Bash doest directly interface natively with many MS products and services without help.

    Neither does PowerShell when it is remote. Hence why you chain of logic isn't making sense. What it interfaces with has no relevance here.

    Maybe it's 2am and and I've not much sleep the past week. But still, I thought I was clear in that there was Zero powershell involved when referring to using Bash instead. I think you switched things up or mixed things around just to screw with me.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    You are using PowerShell or other packages to do it. This isn't what the conversation was supposed to be about, somehow you slipped that in there.

    Actually it is the only thing it can be about. Since PowerShell can't do it either. In both cases the shell on Linux has to request that a shell on Windows do something on its behalf. You kept saying that PS on Linux had advantages when calling PS on Windows to do things for it. That seemed completely crazy since ALL functionality is determined by PS on Windows. Hence why I kept asking for clarification.

    So back to the beginning...

    Since we've now established for everyone that PS on Linux has no advantages whatsoever.... why do you feel it is totally impossible that people want it on Linux to manage Linux rather than solely for managing Windows when you've not clarified that you understand what we all thought was assumed... that the choice of shells on X doesn't affect ability to control Y.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    But still, I thought I was clear in that there was Zero powershell involved when referring to using Bash instead. I think you switched things up or mixed things around just to screw with me.

    You kept answering a question that could only make sense the one way. I'm not sure why you thought that the status of PS on Windows would be changed just because we want to use Bash on Linux.

    The question keeps being... why do you feel PS on Linux has a purpose? It seems now that you've established that it has no purpose under any conditions (on Linux.) Which I don't agree with, I think it's poor but people want it because they want to use it to manage Linux.



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Nobody puts PowerShell on Linux to manage only Linux. It's put there to automate MS/Windows management or to automate MS/Windows and Linux management together more efficiently from the same tool.

    You kicked off with this statement. But this makes no sense given your understanding now that whatever is on Linux is just calling whatever is on Windows. Do you see how this led us into a discussion specifically about Bash on Linux controlling PS on Windows? That's the only logical place to go when this statement is where you started.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    The idea that PS is on Linux to manage Windows makes no sense to me, why would anyone do that?

    And now you see why I stated this. Since both Bash and PS on Linux equally call PS on Windows, using PS on Linux for this purpose doesn't make sense on its own.



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    @Obsolesce said in Shell Speeds, Bash and PowerShell:

    But still, I thought I was clear in that there was Zero powershell involved when referring to using Bash instead. I think you switched things up or mixed things around just to screw with me.

    You kept answering a question that could only make sense the one way. I'm not sure why you thought that the status of PS on Windows would be changed just because we want to use Bash on Linux.

    The question keeps being... why do you feel PS on Linux has a purpose? It seems now that you've established that it has no purpose under any conditions (on Linux.) Which I don't agree with, I think it's poor but people want it because they want to use it to manage Linux.

    Would you rather spend money on a Windows server license to run PowerShell automation, or would you rather run PowerShell automation from a Linux server for free?



  • @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Would you rather spend money on a Windows server license to run PowerShell automation, or would you rather run PowerShell automation from a Linux server for free?

    And we are back again. Why do you feel that this relates to the conversation? We are back to the same confusion. We've established that Bash and PowerShell both work from Linux to automate PS on Windows.

    So do you see how there is no possible answer to your question that won't cause confusion since it is either a worthless question, or implies that, again, you think that PS on Linux does something that you aren't saying and is what I keep asking about?

    So let's ask .... why are you asking this question?



  • Or to state it in the clearest way I can possibly think of....

    When calling PS on Windows from Linux, what do you feel that PS on Linux does that Bash on Linux doesn't do just as well, or better?



  • @scottalanmiller said in Shell Speeds, Bash and PowerShell:

    @Obsolesce said in Shell Speeds, Bash and PowerShell:

    Nobody puts PowerShell on Linux to manage only Linux. It's put there to automate MS/Windows management or to automate MS/Windows and Linux management together more efficiently from the same tool.

    You kicked off with this statement. But this makes no sense given your understanding now that whatever is on Linux is just calling whatever is on Windows. Do you see how this led us into a discussion specifically about Bash on Linux controlling PS on Windows? That's the only logical place to go when this statement is where you started.

    That was in reference to what you said in the video. You said something along the lines of putting powershell on Linux just to manage Linux. I thought that's silly and responded as such.