Book Review: Administrator’s Top 10 Introductory Scripts

One of the reasons I thought we should do a scripting blog is because there are a lot of things (like book reviews) that we can’t do on TechNet. Being somewhat naïve, I thought the other Scripting Guys (who actually read computer books) would jump at the chance to share their opinions with you. So far, though, they’ve kind of wienered out on me. I’ll keep pushing them, however, because I know they have a lot of interesting things to share with the scripting world.


(I’d encourage you to send angry emails to and shame them into contributing to the blog. But – sigh – at the moment I’m the only one who reads and replies to those emails, so ….)


So why can’t I just do book reviews myself? Well, I have a confession to make: I don’t ever read computer books. (I’m not saying that’s good or bad, that’s just the way it is.) One time, when I worked at the University of Washington School of Dentistry doing computer support stuff, I had to swing by the Dean’s Office on my way home to show someone how to do a mail merge in Word. (Back then my days seemed to consist solely of showing people how to do a mail merge in Word.) I set my book (The Collected Stories of P.G. Wodehouse) down and helped the receptionist with her mail merge problem. As I was doing so, our administrative assistant popped by and picked up the book. “Oh, I love P.G. Wodehouse,” she said. “Whose book is this?”




“No, really; whose book is this?”


“It’s mine.”


“No, really, I just want to know whose – fine, don’t tell me.”


No one would believe that I didn’t spend my free time reading about computers. But it’s true.


Here’s another shocker: Up until I couple weeks ago, and before I finally succumbed to family pressure, we had no Internet connection at home. (I know, it’s hard to believe that people could even live in such primitive conditions.) And I won’t even mention the fact that we don’t have digital cable and that I don’t have a cell phone; I don’t want anthropology students hanging around trying to determine whether or not I’m the missing link. (Although the truth is, even the Neanderthals tend to roll their eyes whenever my name gets mentioned.)


The interesting thing, of course, is that people always ask me if I can recommend a good scripting book; heck I can’t even recommend a bad scripting book. In my defense, though, I will say that prior to joining the Scripting Guide team, I had no reason to read a scripting book (not when there are books like Sometimes a Great Notion and Catch-22 out there). And after joining the Scripting Guide team, I specifically chose not to read any scripting books. That might seem like a dumb idea when you consider the fact that I didn’t know much about scripting, but I decided that I didn’t want to be unduly influenced by what other people had or had not done. Besides, if I was writing about scripting during the day, I didn’t want to go home and read about scripting at night.


In fact, up until last week the closest I had ever come to reading a scripting book occurred when I read selected parts of two books on WMI written by Alain Lissoir. These books, by the way, are great; you can’t believe how much information Alain has packed into two little volumes. Be aware, however, that neither book is aimed at beginners; if you don’t know anything about WMI, I’d strongly suggest that you start with the WMI Primer in the Windows 2000 Scripting Guide and then move on to Alain’s stuff. However, if you’re fairly comfortable with WMI scripting and at least somewhat familiar with WMI terminology, then I definitely recommend Alain’s books. (The only problem I have with them is that he’s pretty much explained everything there is to know about WMI; he didn’t leave anything for the rest of us.)


By special request, however, I was asked if I would read a new book – Administrator’s Top 10 Introductory Scripts – by Jeff Fellinge. And so I did. Like I said before, I’m not overly familiar with the genre, but as near as I can tell Jeff has taken a different tack here. What he’s done is written 10 full-scale production scripts (a logon script; a script that lists Active Directory accounts due to expire; a worm vulnerability detector; etc.). He’s then used those scripts as the basis for individual chapters in the book, methodically working his way through each script, explaining how the different sections of each script work. (Incidentally, I'm not convinced that these are the top 10 scripts, but they're useful and interesting nonetheless.)


I really like the fact that Jeff has chosen to write full-featured scripts, scripts that can do things like handle command-line arguments. Why? Well, a lot of people get their scripting information from the TechNet Script Center. Nothing wrong with that, except in the Script Center (as I’ve noted before) we specifically shy away from full-scale production scripts (that is, scripts that use error handling and accept command-line arguments and carry out multiple functions and ….). We always tell people that they can take our little code snippets and knit them into a full-scale production script, but we’ve never shown them any examples of this. Fortunately, Jeff has done that for us. That alone makes it a worthwhile addition to the scripting oeuvre. (See, if all I ever read was computer books, I wouldn’t know how to toss in high-falutin’ words like oeuvre.) We Scripting Guys tend to emphasize the “quick and dirty“ approach to scripting, and that has its benefits. At the same time, however, there are also benefits to using scripting as a way to create more sophisticated utilities. That's the direction taken in this book.


In addition, Jeff has also written these scripts in Jscript. I know there are lots of Web page scripting books that use Jscript, but there are few – if any – system administration scripting books that use Jscript. Yet another first, and a welcome one at that. Although I do everything in VBScript, I like seeing books that use other scripting languages to carry out system administration tasks. That helps drive home the point that it doesn’t really matter, that you should use the language you’re most comfortable with. I know that, because of the Web, a lot of people are familiar with Jscript; I think it’s great that there’s now a book that shows them how to apply their Jscript skills to system administration scripting. I’d hate to think that people might spend years honing their Jscript knowledge, only to feel they had to learn an entirely new language in order to do system administration scripting. You don't, guys. As long as your scripting language can work with COM objects (like WMI and ADSI), well, the language you choose to use is as much a matter of personal preference as it is anything else.


In fact, the one criticism I have of the book is that it doesn’t use Jscript exclusively. The introductory chapters, for example, tend to jump back and forth between VBScript and Jscript, showing concept A in VBScript, concept B in Jscript, etc. To be honest, I’m not sure there’s much to be gained by that. Later on, the big production scripts are written in either Jscript or VBA . Why VBA? Well, in several scripts Jeff use Microsoft Excel as the UI for his scripts, typically returning information from a number of sources and then writing that information to a spreadsheet. I would have liked it better had there been an exclusive focus on Jscript. The truth is, if you’ve decided to use Jscript, well, then who cares how the same operation is carried out in some other language? As the saying goes, ya gotta dance with whut brung ya.


And using nothing but Jscript wouldn't keep you from stashing data in Excel; instead of starting Excel and then running a VBA script, you could start a Jscript script and then launchand manipulate Excel from within that script. Because VBScript, Jscript, and VBA are not alike, I’m afraid people might get a bit confused by some of these scripts; all the more reason to stick with one language all the way through. Interestingly enough, Jeff uses an HTA to serve as the UI for another script. Why not use HTAs throughout the book rather than Excel? To me, it seems like overkill to use Excel simply as a way to store tabular data.


But those are minor quibbles. There is still a lot of interesting code in here, and the next time you’re in your neighborhood bookstore, it might be worth your while to check it out. It’s nice, too, because the book deals with Windows XP and Windows Server 2003. I feel that we Scripting Guys helped jumpstart system administration scripting in Windows, but then we kind of dropped the ball by not following up our Windows 2000 book with an XP/2003 book. I think it’s great that people like Jeff are picking up the slack for us.


By the way, seeing as how the other Scripting Wieners – um, Scripting Guys have chosen to remain silent, I’d be interested in hearing about books that the rest of you have found interesting. If you have a favorite or two, by all means, let us know.


Comments (11)

  1. Stuart Fuller says:

    Two script oriented books I have found very useful for my work are:

    Windows 2000 Active Directory by Alistair G. Lowe-Norris

    -This book probably has the best description for lay people of the VBS object model – see chap. 14. I had a hard time getting my poor brain around the "set = object" & "object method" stuff until I read this book.

    Active Directory Cookbook by Robbie Allen

    -This book is chock full of scripts for AD.

    One of main gripes with all scripting type books, except for the Windows 2000 scripting guide and the two mentioned here, is the automatic assumption that everyone knows the VB object model and that everyone knows programming. I really appreciated the part in the 2000 scripting guide about proper construction of IF THEN ELSE and SELECT CASE. Yeah… this is stuff any good programmer will know but I am a systems administrator and not a programmer so I need some help.

    Now if the Scripting Guys could write a good article about the proper way to script ACL’s & ACE’s in Active Directory, my life would be fulfilled….

  2. You’ve been Taken Out! Thanks for the good post.

  3. Steven Griffiths says:

    I’d like to echo your sentiments regarding Alain Lissoir’s 2 volume treatment of WMI – its simply superb, but as you say, perhaps not for the beginner.

    The Windows 2000 Scripting Guide is also a permanent resident on my desk as is the Alistair G Lowe-Norris book mentioned by a previous contributor.

    The other resource I use regularly is Managing Enterprise Active Directory Services by Robbie Allen. I like this because it is one of the few volumes that gives examples in Perl.

    If anyone has any good recommendations for scripting Exchange, please add your contribution…

    …and if Paul Thomsen at MS is reading, how about a book on scripting SMS?

  4. Tarjei T. Jensen says:

    Book recommendations are appreciated very much. If is often difficult to decide which books to get.


  5. Pierre says:

    This is the book which convinced me to go further with WMI.

    Excellent book

  6. AC says:

    Please note something very important in this quote:

    "Jeff uses an HTA to serve as the UI for another script. Why not use HTAs throughout the book rather than Excel?"

    Do you know what PCMCIA stands for? People Can’t Memorise Computer Industry Acronyms. Please use the writing technique of writing the full acronym out the first time you use it or have a glossary page for all of the acronyms you use. The latter might be preferred so that you don’t keep writing out Windows Management Instrumentation (WMI).


  7. Centaur says:

    With some help from the blog engine, acronyms could be expanded into something like

    <acronym title="Windows Management Instrumentation">WMI</acronym>

Skip to main content