VBScript is cool?!? Yeah, I said it.

So everybody is talking about PowerShell and that’s great.  I love object oriented languages for scripting too.  PS is amazing.  But what about our old friend VBScript?   Our workhorse for the past decade?

Reasons why VBScript can be cool

  • Great samples.   Across the blogosphere we have thousands of articles, snippets, and walkthroughs to pull from.  Save time, copy and reuse.
  • Wide compatibility.   Even Server 2003 or Windows XP RTM will be able to run this stuff.   No Windows Update, no prep work, no doubts.
  • Familiar/proven.   There are many people that know this tool and how to use it.  As we learn new tools we need the old ones for our day jobs.
  • Quick edits.     While true of any scripting language “right click edit” is very handy and I generally dislike compiling dot net for admin work.
  • Editors.   Even SharePoint Designer 2007 can read and colorize VBS.  With PowerShell 2.0 we now have ISE and I really like it.   Using a GUI is required to get the work done quickly and correctly no matter what the language.

After a few years in the server admin business I’ve realized the tools evolve and so do we.   But ultimately our creativity and awareness of “fit” between tool and goal are what get things done.   So if the shoe fits … pull out an old script, dust it off, and give it new life!    A production outage is no time to read a reference book.

I’ll follow up by posting the code of my favorite VBScripts I use today in a real live production MOSS 2007 environment.  It gets the job done.  Yes, it should be re-written in PowerShell for SP2010 and Server 2008.   The “grid” scripts are my favorite and present on a single page configuration across machines for snazzy things like:

  • File versions
  • Windows services (state/startup mode)
  • Keberos NTAuthenticationProvider in IIS 6.0
  • Applications installed (registry)
  • Web.config modifications

 

image 
imageimage
imageimage

Lastly, empirical evidence suggests a fondness for this quirky old language via search results.   Open-mouthed

http://thumbs.dreamstime.com/thumb_229/1201479864wVkudS.jpg

6 Comments

  1. Long live VBscript … I want to learn Powershell, but I have yet to find a reason. I know VBscript like the back of my hand, it’s on every one of my systems, and whenever I need create a GUI, it’s so damn easy to throw up an HTA which the VBscript code inside working the magic. Best part is if I run into a issue, I always find more resources on how-to with JScript/Javascript/VBscript and HTML then I do if I search for Powershell and WCF. I’ll learn to love Powershelll one day…but not today!

  2. Long live VBscript … I want to learn Powershell, but I have yet to find a reason. I know VBscript like the back of my hand, it’s on every one of my systems, and whenever I need create a GUI, it’s so damn easy to throw up an HTA which the VBscript code inside working the magic. Best part is if I run into a issue, I always find more resources on how-to with JScript/Javascript/VBscript and HTML then I do if I search for Powershell and WCF. I’ll learn to love Powershelll one day…but not today!

  3. I love VBScript, and have been writing about VBScript for years (in fact I wrote three books on the subject). At the TechNet Script Center we have TONS of resources on VBScript, and a Script Repository with thousands of VBScripts. Much of the buzz over PowerShell is because it is new, and will be the future. But for many things, today, VBScript rocks!

  4. I love VBScript, and have been writing about VBScript for years (in fact I wrote three books on the subject). At the TechNet Script Center we have TONS of resources on VBScript, and a Script Repository with thousands of VBScripts. Much of the buzz over PowerShell is because it is new, and will be the future. But for many things, today, VBScript rocks!

Leave a Comment