Scripting Windows Administration Tasks

Scripts can save administrators a lot of time by performing in just a few seconds repetitive mundane tasks that might take administrators minutes or hours. Scripts also help reduce errors when performing long and complicated tasks. Scripts can be written to perform any task that can be accomplished from the Windows command line. In addition, many Windows utilities provide a command line interface, allowing them to be run by scripts in background mode. Scripts can also be set up to run during off hours, allowing work to be performed even when administrators are gone for the day. This way, long-running maintenance tasks such as disk defragmentation can be performed during off hours without impacting the user.

Note 

For information on scheduling script execution, refer to "Scheduling Tasks with the Scheduled Task Wizard" in Chapter 4, "Application Management."

Windows XP Professional provides two scripting solutions. Windows Shell scripting provides a complete collection of programming statements and uses familiar Windows XP commands to create scripts. The WSH provides an object model that provides direct access to many Windows resources that are not available to Shell scripts. To use the WSH, an administrator must first know a scripting language such as JScript or VBScript. The scripting language can then be used to develop scripts that work with the WSH objects to automate Windows tasks. Windows Shell scripting is easier to learn, but the WSH has a greater range of capabilities. Both of these scripting tools are discussed further in the sections that follow.



Microsoft Windows XP Professional Administrator's Guide
Microsoft Windows XP Professional Administrators Guide
ISBN: 1931841969
EAN: 2147483647
Year: 2005
Pages: 358

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net