Boswell's Q&A

Stepping Up to Scripting

Admin wants to move up the experience ladder and learn scripting.

Bill: I'm a relatively experienced Windows and NT administrator who wants to get my skills to the next level by learning scripting. I know that there are a lot of scripting languages out there. I'd like some advice on which one to choose and how best to get started.
—Chuck

Chuck: You're making the right career choice, Chuck, because a thorough knowledge of scripting will enhance your career as an administrator more than just about any other single skill. You'll not only learn how to do your job more efficiently and effectively, you'll learn more about the fundamental operation of the operating system and network as you gain experience writing scripts.

The choice of a scripting language depends quite a bit on how portable you want your skills to be and how much help you expect to get in the way of example scripts and so forth. Opinions vary widely. Here's my take on the subject.

Get Help from Bill

Got a Windows or Exchange question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to Bill at mailto:[email protected]; the best questions get answered in this column.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message but submit the requested information for verification purposes.)

If you are primarily a Windows administrator and you anticipate only working in a Windows environment for the next two to five years, then VBScript is probably your best choice. It has a wide range of capabilities, it's simple to learn and you'll have lots and lots of company to turn to for advice and pointers and sample scripts.

VBScript is not the best choice, though, in situations where you need to feed more than a few arguments into the script or you need to implement a complex flowpath. Also, the file-handling syntax in VBScript will make you want to curse in many languages, not just programming ones. If you start with VBScript, you can graduate to Visual Basic .NET to build handy little GUI-based utilities and to do Web interfaces, but once again, you're tied to a single platform family.

Javascript gives you quite a bit of power and flexibility in building Web-based tools. So does Perl. Both are devilish to learn but once you master them, you'll have a skill that can be used outside of Windows in the event that you want to expand your marketability.

Personally, I really like Python. It's simple to learn, completely intuitive, amazingly flexible and pretty darned fast. Python has only just started to claim mindshare in the Windows world, but look for it to start gaining lots of support as people discover it.

Bottom line? Learn VBScript for down-and-dirty Windows jobs and Python for cross-platform, enterprise-class work.

To learn VBScript, start with the Windows 2000 Scripting Guide from Microsoft Press. It was written by "The Scripting Guys" at Microsoft and is a truly indispensible resource. The presentation is conversational, the scripts really work, and the examples are clear and practical.

To learn Python, I'd start with Core Python Programming by Wesley Chun. The online documentation and tutorial is also terrific. A great free tutorial called "A Byte of Python" is available at http://www.python.g2swaroop.net.

You might also want to check out the online Safari library at http://safari.oreilly.com. For a few dollars a month, you can browse and search a whole bookshelf. I use this resource constantly.

Hope this helps.

About the Author

Contributing Editor Bill Boswell, MCSE, is the principal of Bill Boswell Consulting, Inc. He's the author of Inside Windows Server 2003 and Learning Exchange Server 2003 both from Addison Wesley. Bill is also Redmond magazine's "Windows Insider" columnist and a speaker at MCP Magazine's TechMentor Conferences.

comments powered by Disqus
Most   Popular