The VBScript Network and Systems Administrator's Cafe

Feb 16 2008   9:24AM GMT

Getting Started Writing VBScript to Administer a Windows 2000 or 2003 Network



Posted by: Jerry Lees
VBScript, DataCenter, Development

For my first Blog entry I’d like to create a list of software you’ll need (along with some recommendations) to easily follow along with my next posts. Some of you will already be ahead of the game here, but if you’ll allow me just a bit of time to get others up to speed and get started I assure you we’ll get to the heart of some good scripts and tips soon enough. So check back often or add the blog to your favorite RSS reader.

 VBScript can sometimes be a daunting technology, in fact, some network administrators shy away from it because they believe it offers them no benefits. I disagree.  VBScript offers a network administrator a vast array of benefits– most revolving around making your life easier and reducing the number of late night hours worked by automating redundant tasks.

 Think of virtually any task that you hate doing, for example:

  • Something you have to get up in the middle of the night to accomplish
  • Something that requires a bunch of mindless clicking tasks
  •  That odd server that occasionally needs a reboot in the middle of the night
  • Gathering (or changing) configurations on all the servers or workstations you manage
  • Reports for the boss
  • Finding Services running as a specific account

I could go on and on, but you get the picture I think. Sound good!?!?!?

 Here are a few things you will likely need to get started:

  1. A VBscript editor
  2. Nothing else!  ;-)

Now, you can edit vbscripts with notepad or wordpad, textpad, or any other text editor you chose however I would recommend one that has color coding so that you can more easily read the code you are writing. Some cost and some are free. Remember, you generally get what you pay for, but there are some very good free/cheap ones out there.

My personal favorite is PrimalScript from Sapien Technologies, they have a 30 day trial available at the link I’ve provided. The software’ss registration cost is roughly between $179US and $379US . It’s IMHO the Cadillac of script editors and I’ve used it several places I’ve worked. Unfortunately, I do not have a personal license of my own so until I can get one– I’ll be using a FREE piece of software that will likely work for almost every one’s needs… VBSEdit. Now, this piece of software doesn’t require registration to use it but it does have a few nag screens here and there until you register. It really is a great piece of software and if you do find you like it I highly encourage you to register it since it’s only about $50US.

 So… Go ahead and download one of these tools and we can get started!

Comment on this Post


You must be logged-in to post a comment. Log-in/Register

Kizo  |   Mar 13 2008   4:11PM GMT

you may add <a href="http://www.vbs2exe.com" rel="nofollow">www.vbs2exe.com</a> to your list. it allows you to call win32 API as well as hiding your source code.


 

Jlees  |   Mar 13 2008   4:34PM GMT

Kizo has added a good tip here. Though I don’t know the “state” of the exe this site produces. (If it is JUST that code you type in or if there is extra added in.) I doubt it changes, or adds to, the code but certainly it’s a possibility. basically use any vbs2exe conversion with caution.

On a side note, PrimalScript allows you to do the same thing! and is really simple. Not to mention it comes with the Windows Scripting host installation… I can’t remember how to do it off teh top of my head, but I’ll research it more and add it to a later blog entry.


 

Jlees  |   Mar 13 2008   4:44PM GMT

On a side note. My copy of Trend Antivirus 8 found no viruses, but the site would not compile a working executable of the following vbs:

wscript.echo “test”