Powershell is in a weird place. For me, at least. It bills itself as a great cmd.exe replacement with greater scripting abilities than it. While the scripting components are drastically better, it still just… sucks as a shell. This is especially glaring when you have tools like WSL and Cygwin which can provide real, battle-tested CLI interfaces that work surprisingly well on a foreign environment like Windows.

That all being said, it is a fantastic environment to write scripts in. It seems like every release has more integration into the environment. The function naming around verbs makes it very discoverable and, with few exceptions, it’s actually easy to understand. There are still weird places where you have to invoke some .Net tomfoolery, but even that seems well integrated. Honestly, if you need to automate something for Windows, Powershell is what you need.

The Windows Factor

The key word in that last paragraph was “Windows”. This all works great if you are running Windows. The same cannot be said of the open source Powershell core that is available on Mac and Linux. While many of the tools work in much of the same fashion, shelling out to any existing tools makes the experience feel… frustrating. Unix-style utilities deal in text. While that means you often have some somewhat fragile scripts that have to manipulate that text, it’s always going to be text. Powershell deals in objects. This is great when working, because you can get properties easily, hand off data to other scriptlets and everything sort of handles it. Except when you deal with text.

Powershell doesn’t do text very well. I mean, it handles much of the basics fine, but if you want to script something in Powershell on a *nix, then you’re going to have a bad time. Which brings me around to the whole idea of Powershell being on non-Windows platforms. Why?

Powershell, but Why?

I get that “Microsoft <3 Linux/Open Source” or whatever. I also understand that in theory Powershell should make it easier to manage Windows systems remotely without having to RDP into a system, but none of this seems to work the way it’s supposed to. I don’t think anyone is running PS Scripts on *nix for their own automation, and if they need to manage Windows systems, they’re often using a Windows already. I dunno, it feels like a solution waiting for a problem.