Get IT Done: Resources for writing admin scripts

Online scripting information

A lot of excellent references and tutorials are available to help you learn how to write scripts. If you're learning scripting specifically for network administration, however, you should be aware that many resources lean heavily on scripting for the Web. Although the scripting languages may be the same, such as JScript or VBS, their purposes are different. Network administrators will find that resources focusing on Web scripting won't be terribly useful.

In this final article in my series on admin scripting, I'll discuss some of the best books and online resources you can use for further study.

Allen Rouse's series on admin scripting

Useful books
If you go to the Web site and search on the keyword scripting under books, you'll probably find more than 80 titles listed. Some of them are for UNIX shell scripting, some cover mainly Web scripting, and some deal specifically with scripting for network administration. I'll highlight three of the most useful books that I'm familiar with, but there are certainly other good ones out there.
  • Microsoft Windows Shell Scripting and WSH Administrator’s Guide, by Jerry Lee Ford, Jr., Premier Press, 2002, ISBN 1-931841-26-8. I really like this one. It covers shell scripting, the Windows Script Host, JScript, and VBS, all from the point of view of a network administrator. It’s actually one of the few I’ve seen that covers using the FileSystemObject, Shell object, and Network object. It gives examples and shows the correct syntax in both JScript and VBS for each one. The section on Windows shell scripting is quite comprehensive.
  • Windows NT Scripting Administrator’s Guide, by William R. Stanek, M&T Books, 1999, ISBN 0-7645-3309-6. This is similar to the first book, in that it covers using both Windows shell scripting and the Windows Script Host with JScript and VBS. But each book covers various functions in slightly different ways, with different examples. If you're having trouble understanding some aspect of scripting, it can be useful to go to another source. Often, looking at the two books together can lead to a better understanding.
  • Windows Admin Scripting Little Black Book, by Jesse M. Torres, The Coriolis Group, 2001, ISBN 1-57610-881-3. This book is quite different from the other two. It is designed to get the network administrator up and running quickly for any given task. Instead of offering a progressive tutorial on scripting, it is divided into specific functions, such as scripting installations and updates, file management, and local and remote system management. Within each functional area, it discusses specific actions, such as scripting a silent Windows 2000 service pack installation, and provides the specific information you need to create that script. It serves as a nice complement to one or both of the first two books.

Web sites for admin scripters
As you might expect, Microsoft MSDN maintains a Web site for scripting. A good place to start is the Windows Script page, which can lead you into the details of both JScript and VBS. Although most of this information applies to scripting for the Web rather than network administration, you'll still find some useful information there—such as the detailed documentation on how to use the FileSystemObject object in VBS.

In addition to Microsoft, there are several other good sites that can help you learn Windows scripting. Make sure you take a look at these four:
  • Windows Scripting Solutions (hosted by Windows and .NET Magazine)—First, I should point out that to access the full content of this site, you must subscribe to its periodical, Windows Scripting Solutions, for $129 in the U.S. or $135 outside the U.S. With that caveat, this site does offer excellent content in the form of useful articles concerning all aspects of scripting. In addition, you can download code to use in your own scripts.
  •—This site is not strictly devoted to scripting but covers all the aspects involved in supporting and working with a Microsoft network. It's free but requests a donation if you find the site useful. The site serves as a knowledge base that indexes Microsoft, third-party articles, and white papers, and it provides links to other sites that host information you might find helpful.
  • Windows & .NET Magazine Scripting 101 Series—This four-part series was written several years ago, but it remains an excellent guide for learning the ins and outs of the Windows Script Host and VBS, along with some good code examples.
  • WinGuides Scripting Guide for Windows—This site allows you to access it for free or pay for premium access. It offers reference information for scripting concepts and techniques, including some excellent code samples.

Sticking to the script
Plenty of good information is out there to help you learn and improve scripting skills for network administration, but you need to know how to sort it out from all the information that's geared toward Web scripting. Once you do, the key will be to just roll up your sleeves and get to work on it. Dig in and write scripts and test them in a lab environment—and don’t be afraid to make mistakes.

Editor's Picks