In our first installment, we talked about the personal qualities that make for a good Windows Desktop Administrator. In this article, we’ll talk about Scripting and why it’s extremely valuable to learn.
Scripting
Remember earlier when I told you about “productive laziness”? If you’re “ordinary lazy” then you won’t be getting any work done. Before long, your boss is going to notice that and send you packing. But if you’re “productively lazy” you don’t want to do work that is boring, repetitive, and prone to mistakes. That’s where scripting comes in.
There are many different scripting languages you can use in Windows. Many beginners start with DOS batch scripts. That’s a good place to get a feel for scripting. Batch scripts are great for quick-and-dirty operations, like copying a bunch of files to every PC on your network. You can do that in a couple of lines of scripting and be confident that it’s getting done methodically and consistently. But there are many things batch scripts just can’t do. For example, it’s difficult (if not impossible) to have a batch script create an Excel spreadsheet, populate it with data and formulas, then save it. That’s where more powerful languages like VBScript come in.
VBScript based on the Visual Basic programming language and is very powerful. With VBScript, you can contact machines across the network and change registry settings. You can launch applications and send them commands to do things (like the spreadsheet example above). You can read serial numbers, create Active Directory accounts, and any number of other things. VBScript is something every desktop administrator should know how to use. Otherwise, you’re probably spending a lot of time doing things that a script could handle for you automatically. Have a look at the VBScript examples on this site to show you what it can do for you.
Powershell is the next step after VBScript. This language is emerging as the gold standard with the rise of Windows 7 and Windows Server 2008. It’s like mixing the best of DOS command prompts with the power of VBScript.
Learning VBScript
Below are some books on scripting that I’ve personally read and found useful to me. If you are learning to script, these are excellent resources. You may also want to do some Internet searches for tutorials on scripting and work your way through some of those.
WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Jr.
Advanced VBScript for Microsoft Windows Administrators by Don Jones and Jeffery Hicks
VBScript, WMI, and ADSI Unleashed: Using VBScript, WMI, and ADSI to Automate Windows Administration by Don Jones