Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

June 19, 2003 12:00 AM

Scripting Administrative Tasks

Windows IT Pro
InstantDoc ID #39348
Rating: (0)

Every so often, I offer a trick or routine for using batch files that makes a user's or administrator's life easier. I'm always astounded by the reader reaction to these articles: Usually, reader email pours in, asking for more details about how to use batch files and where to find more information about batch files. Having started in computers before the introduction of MS-DOS, and having worked through MD-DOS's permutations, I find throwing batch files together to be second nature.

Windows server administrators often spend a fair amount of time creating logon scripts for users. Windows Script Host (WSH) has been available for several years, and many administrators have learned how to write scripts in VBScript. Despite the obvious advantages of scripting and of using command-line tools in scripts, Windows hasn't given administrators the ability to completely script administrative tasks because many utilities require interaction with the GUI. This deficiency is one of the biggest knocks that Windows servers have taken from critics, particular the critics with UNIX backgrounds. In UNIX, all necessary tools can be scripted, and scripting administrative tasks is part of the UNIX systems administrator's daily routine.

Microsoft finally took heed of this administrative necessity with the release of Windows XP Professional on the client side and Windows Server 2003 on the server side. In these OSs, you can run all the administrative command-line tools from a script. You can call these administrative tools from the command line, from batch files running within the command interpreter, from logon scripts, and from WSH scripts. More than 175 command-line tools are available in the latest versions of Windows, and more than 30 of these tools are new to these OSs. You can find a wealth of information about the tools, including simple tutorials about how to use them in scripts, by launching the Help and Support Center (HSC) and searching for "Command Line Tools" within the HSC search parameters.

Although using the new command-line tools to automate administrative tasks can greatly simplify a systems administrator's life, one major problem exists: All the computers on which you want to run administrative scripts need to be running Windows 2003 or XP. Few administrators have computing environments that are so simple, and spending time automating your administrative tasks for a small percentage of the computers you need to support is hard to justify from both a time and a cost perspective.

Fortunately for systems administrators, third-party software vendors offer a variety of scripting solutions, ranging from enhanced batch languages to complete UNIX-style command shells. Such solutions can give administrators the ability to quickly, securely, and easily build scripts that automate complex or repetitive administrative tasks that would otherwise require direct interaction with every computer for which they're responsible. The scripting enhancements in Windows 2003 and XP don't make these third-party tools obsolete; if anything, the fact that Microsoft has acknowledged the need for improved command-line capabilities validates the intentions of third-party developers. Plus, Windows 2003's and XP's scripting enhancements are brand new, whereas many of the third-party tools have years of development behind them, some reaching back to the days when UNIX was the primary network OS. These vendors have had the opportunity not only to optimize their tools for the Windows environment but also to apply the lessons learned from years of use in other enterprise OSs. Thus, these vendors can provide the Windows systems administrator with well-designed and well-tested tools that can deliver real benefits. In addition, these tools let you create scripts that run across multiple versions of the Windows OSs, and that in many cases don't require specific OS capabilities.

If you haven't looked at the new Windows 2003 and XP command-line tools, sit down and at least examine the information provided within the OS about these tools. If you already understand the value of these tools, it's well past time you began looking at third-party enhancements.


More About High-Resolution Monitors

Regarding last week's column, dozens of readers have written to me asking about the results of my search for a high-resolution monitor. Have no fear: I'll report the finalists I've identified and the choice I make (and the reasons behind it) in a future edition of this column. Given these monitors' prices, I'm not rushing my decision.

Related Content:

ARTICLE TOOLS

Comments
  • lurims
    8 years ago
    Sep 03, 2004

    Nothing

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.