Thursday, November 12, 2009

PowerShell vs KiXtart

Blah blah blah.  I’ve done this one before, but this is different.  Why?  I don’t know.  I don’t care either.  The weather outside is horrible.  Yard is flooded.  Tree limbs down all over the place.  Streets are flooded and limbs, leaves and debris are floating and lodged all over the place.  Anyhow, I was looking at some PowerShell code I’ve been working on and it kicked me in the face how similar it often is to KiXtart script.  Even the import-module aspect being like the include statement.  So, someone hit me with a “but you can load cmdlets and do so much cool stuff” remark.  So?  I can do that with a UDF or included KiXtart script as well.  Same thing.  Both can be obfuscated/encoded for compactness and (quasi) protection.  PowerShell offers signing, which (I don’t believe) KiXtart does, but that’s minor.  I’ve yet to find a large number of script writers signing their work anyway.  Maybe cmdlets are the exception?

Here’s the rub (in my humblest opinion): PowerShell exposes the wonderful world of .NET to your scripting arsenal.  So, why then do such a VAST majority of PowerShell script examples make NO reference to .NET functionality at all??!  Most are simply recoding of other languages to invoke LDAP, WMI/WBEM, ADSI, SQL, etc.  That was my complaint early on in Monad: when will the shift occur to make it obvious what PowerShell can do that the others CANNOT?  Not simply what it can do differently.  Nobody needs different, besides boneheaded brainwashed Apple fans. 

Most script writers (regardless of Mac/PC/Linux/whatever) want efficient more than different. They (we) need something clearly and obviously better.  I don’t want to hit a web site that shows me the same WMI query shit in a new language.  That’s no benefit to me whatsoever.  How about a nice, fat, juicy collection of scripts that (a) make use of the .NET framework on the front end, and (b) aren’t so ridiculously verbose that you shake your head in disbelief that somewhere in the pile of cryptic goo there is a real hidden benefit?  If that exists, please, someone, point me to it?

If the final round bell rang right now, I’d score the fight dead even.  Crowds don’t like a draw.  They want to see a clear winner.

No comments: