AMA: What Wouldn’t You Use PowerShell For?

Andy asks:

Is there anything you wouldn’t use PowerShell for?

I hope you’ll ask a question, too!

Making a cocktail, perhaps.

Look, PowerShell is a tool; I tend to use the right tool for the job at hand. PowerShell is also, unlike many scripting languages, not an attempt to provide functionality; it’s an attempt to enclose existing functionality in a more consistent and admin-friendly wrapper. So I’ll sue PowerShell when (a) the functionality I need has been “wrapped” into PowerShell commands or (b) I’m attempting to “wrap” functionality into PowerShell commands myself.

There was a time when I used Perl a lot, because it’s got mad string-parsing sk1llz, and I was doing a lot of text log file stuff. But now I tend to do that same stuff in PowerShell. Not because .NET’s string-munging features are better; they’re not. It’s because when I do get .NET to do what I want with the text strings, I like wrapping that up in a PowerShell command for E-Z Future Use. The resulting commands are easier for me to use and share than a standalone Perl script, and in the Microsoft world, PowerShell is a more commonly installed runtime than Perl.

There are times when PowerShell isn’t the right tool. For example, I built an LED-based music and light show controller for my Disney bathroom using a Raspberry Pi; PowerShell was demonstrably not the right tool. Python was; it was native on Raspian Linux, and the LED controller provided libraries for Python. So I used that.

I’ve used lots of stuff over the years. VBScript. VB. KiXtart. Perl. Python. OS/400 CL. And sure, PowerShell. It’s all about the job at hand.

One thought on “AMA: What Wouldn’t You Use PowerShell For?

  1. Brian Finn

    The first paragraph has the line “So I’ll sue PowerShell when (a) the functionality I need…” where I think it should be “So, I’ll USE PowerShell when…”. Otherwise, I was wondering how you were going to get PowerShell into court. 🙂

Comments are closed