Rants about Powershell

Why does this language have to make for such FUGLY scripts? I can't dispute it's utility but I have never seen a functional end product in this language that had any atheistic appeal.

Is there a term for this? Do any of you know what I'm talking about, or am I just being crazy here?
closed account (E0p9LyTq)
It's Microsoft, ugly is part and parcel of the programming/scripting philosophy.

It does what it is designed to do, be useful for IT professionals, not really an app for the average user.
Hey, at least it's not Bash.
If you prefer, you can embed C# in a PS script and write everything in that.
It feels very much like BASH though, all of this "pipe this to that" garbage makes me cringe because the underlying .NET IS an object oriented framework. I might have to pick up C# next.
Absolutely agree, powershell is atrocious to look at for me.

Also, just look at this SO question's answer:
https://stackoverflow.com/questions/2035193/how-to-run-a-powershell-script
Luke Puplett wrote:
Anyone else think this, from a simple top 3 use-case situation, is just crap? I've spent 30 mins working out how to run a script made by the same scripting tool. Seriously?!!?


That being said, I'm being a bit unfair because I only know the basics of powershell scripting. I'm sure it becomes a lot less cloudy once you're used to it... I find it more comfortable to make the equivalent scripts in C#.
I started out really liking it one time I needed to script the signing of an executable generated by VS. Stuff like loops and decision is way more intuitive than Bash, let alone Batch.
But a few months ago I had to script shutting down a Hyper-V VM and backing up the data and it lost quite a bit of good taste with me. I can't remember what it was now, but there was something serious unintuitive about how parameter passing works, to the point where I thought I was passing a value and I was actually passing the name of a variable as a string.

And yeah, C# has really grown on me as a general scripting language. The syntax is way better than Bash etc., VS is better than Python's IDE, it offers good performance, and .NET works great on Linux with Mono. If there was an IDE for it that was more lightweight than VS I'd probably use it for all my scripting. The only downside is that Mono is a fairly big package, so I can't use it for scripts that will be distributed (I don't want to impose Mono as a requirement unless I really have to).
Topic archived. No new replies allowed.