“bashing” PowerShell

By | October 22, 2020

Even though PowerShell has been around for apparently a long time (cerca 2002) it only came onto my “radar” recently as the “app” that can be used as a Text-Terminal to ssh somewhere. But I was then surprised to discover that in fact PowerShell also exists for MacOS as well as Linux!

So I looked a little more closely at the PowerShell commands. And I decided that for a casual user like me, that is not only an “end user” but also rarely on the Windows platform, this would probably be a waste of time.

The articles I find online seem all targeted towards IT personnel that has to maintain Windows systems, sometimes a large number at the same time, and since it’s Windows native, contains all of the DOS commands as aliases, it is a natural fit for them, but not for someone like me.

I wrote an entry about PowerShell here:

PowerShell – an opinionated primer 

that has useful links. Two of them are about learning PowerShell, and 3 of them are YouTube videos, one of which convinced me that PowerShell was not for me.

I did try. I even installed PowerShell for MacOS on my Mac!

But then I found that, well, it’s not all rosy even for a “cross-platform” software:

  • Some of the commands are Windows only (Especially those about “services” listed with command Get-Service. In a way it makes sense as these would be Windows “processes”. But couldn’t there be a way to see the “services” on the “current system?”
  • DOS commands are ALL (they say) aliased so that they work within PowerShell as-is. Yes, it works for Windows, but then some of them don’t exist on MacOS (did not even bother to try Linux.) And they are not even the most obscure ones! ls and man which in fact should be considered “native” on MacOS X!

So the command Get-Alias cd, dir, ls, man  provides all answers if asked on a PowerShell on Windows:

CommandType Name
----------- ----
Alias cd -> Set-Location
Alias dir -> Get-ChildItem
Alias ls -> Get-ChildItem
Alias man -> help

But on a Mac this is what I got:

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           cd -> Set-Location                                            
Alias           dir -> Get-ChildItem                                          
Get-Alias: This command cannot find a matching alias because an alias with the name 'ls' does not exist.
Get-Alias: This command cannot find a matching alias because an alias with the name 'man' does not exist.

At that point it was: This is ridiculous!

Just forget this and stick with learning more of bash (even though now on a Mac we’ll have to get used to ksh)

So there you go… my “bashing” of PowerShell…

 

 

 

 

Share this:

Leave a Reply