WindowsDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


AddThis Social Bookmark Button

Directions in Windows Scripting
Pages: 1, 2

Tulloch: What's the best way for a Windows administrator who is not a programmer to get started learning how to script?



Jones: Some training. This isn't stuff you can pick up on your own in most cases, without some kind of help--a book if you're a reader, a class if you're a listener, a video if you're somewhere in the middle. VBScript just has all these basic concepts and things you need to know before you can effectively do anything with it. While I'm a big fan of copying and pasting other folks' scripts that they've shared, you still need to know what you're looking at or you just wind up with these Frankenstein scripts that don't ever work properly. My first scripting book, Managing Windows with VBScript and WMI, is intended for someone who has no experience and doesn't want to become a programmer. Read it, walk through the exercises, try the scripts, and really spend time reading the scripts and figuring out what they do, and you'll be on your way.

Tulloch: Once one has mastered the basics of VBScript and WMI, how can one really get the most out of Windows scripting? What power tools and techniques are available?

Jones: I think just experimenting is probably the best way. Look at other people's scripts, visit websites like ScriptingAnswers.com, read advanced materials--I have an Advanced VBScript for Windows Administrators book out now--do whatever you can to keep pushing the envelope on your scripts. Start really understanding how COM works and how VBScript can use it, start working with ActiveX Data Objects to interface your scripts to databases, that kind of thing.

Tulloch: Monad is being touted by some as the "next big thing" in Windows scripting. Is it really something radically new or is it just incremental in importance? What will you be able to do with Monad that you can't do today using WMI and VBScript?

Jones: It's a big deal. It's an all-new shell that logically replaced Cmd.exe; not to say that Cmd.exe won't be in Windows, but MSH is sort of "Cmd.exe for the 21st century." Rather than command-line tools like EXE files, MSH uses little cmdlets which are written in .NET. The cmdlets all follow a standard set of usage patterns, so learning how to use one helps you learn how to use others--they're consistent, in a way today's command-line tools aren't. Instead of BAT files for scripting, you write MSH scripts that string together cmdlets. Like BAT, there's a scripting language, although it's much more robust and flexible than the BAT scripting language. MSH's scripting language sits somewhere between C# and VBScript, so it's pretty easy to pick up if you're already scripting. I think its big advantage for administrators is that it leverages .NET, and Microsoft is putting everything in .NET. Like I said earlier, you'll be able to totally run Exchange 12 through MSH, and hopefully the eventual Windows-specific release of MSH will let you really manage Windows more consistently and more totally than you can today.

Tulloch: What else do enterprise administrators of Windows networks need to know about scripting?

Jones: Just that scripting is here to stay. VBScript has been around since the mid-1990s and administrators are just now picking up on it, but every administrator needs to get into scripting. It's not going to be long before managers start making this a top item when they're hiring and promoting--I've worked with companies who are literally saving hundreds of thousands of dollars a year because scripting is making their existing administrators more effective, and eliminating the need to staff up. One company doubled their user base without adding administrators because they invested in scripting training and they do a lot of automation now. That's an argument a CIO or CFO can't ignore, and that means Windows administrators shouldn't be ignoring it either.

Tulloch: Finally, tell us a bit more about yourself. You recently worked at Microsoft--what did you do there? Why the change to Sapien?

Jones: I actually was never a Microsoft employee--a "blue badge," they call it--although it sure did seem that way! I did a lot of consulting work for Microsoft Learning, but I still did a lot of freelance consulting and stuff, too. The move to Sapien was really a desire to do more with ScriptingAnswers.com and scripting education. With a company behind me, we're putting some great new training products together, including new video-based, self-paced training. I'm able to make it to more conferences to meet people and teach them whatever I can, and I'm able to spend a lot more time on ScriptingAnswers.com just answering questions, posting tutorials, adding scripts to our ScriptVault, and so forth.

Tulloch: Any more books in the pipeline? Your was excellent, though the plot was a bit dull and the characters all seemed the same. ;-)

Jones: Yeah, I get that a lot. Advanced VBScript for Windows Administrators is out, as I mentioned, and that was a humdinger. It's a pretty hardcore book and it was a lot of work to get it together, but the response from readers so far has been amazing, so it was worth the time. I'm actually starting work on a Monad book right now. It'll be very focused on the needs of a Windows administrator, so it won't get all bogged down in the .NET stuff, but rather just teach you how to use the thing effectively. That should be out this year, around the time Exchange 12 ships, if not a bit earlier. I do a lot of writing for RealtimePublishers, too, and I'm doing some new eBooks for them on Windows recovery and administration. They're great eBooks and totally free--and I've got a scripting eBook with them, too, which is also free.

Tulloch: Thanks for your time, Don, and for being willing to share your expertise with O'Reilly readers.

Jones: You betcha.

Mitch Tulloch is the author of Windows 2000 Administration in a Nutshell, Windows Server 2003 in a Nutshell, and Windows Server Hacks.


Return to the Windows DevCenter.