Introduction

Welcome to the Microsoft® Windows® 2000 Scripting Guide.

As computers and computer networks continue to grow larger and more complex, system administrators continue to face new challenges. Not all that long ago, system administration was limited to managing a handful of computers (most located within the same general area), a relatively small number of user accounts, and a few applications, many of which had no knowledge of, or need for, a local area network.

Today, of course, system administrators often manage hundreds, and even thousands of computers, as well as a corresponding number of user accounts. These computers, many situated in remote locations, run scores of applications, and rely heavily on networks and networked resources including file servers, Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) servers, and shared printers. This has made it imperative for system administrators to find management solutions that:

  • Can be tailored to meet the unique needs of the organization.

  • Can operate against multiple computers, and against remote computers.

  • Are quick, easy, and cost-effective.

Scripts provide all of these capabilities, and more. In addition, scripting requires no investment in hardware or software beyond a computer running Microsoft® Windows® 2000.

This book introduces you to the scripting technologies included in the Windows 2000 platform. It teaches you the basic concepts underlying such key scripting technologies as VBScript, Windows Script Host (WSH), Active Directory Service Interfaces (ADSI), and Windows Management Instrumentation (WMI). In addition, the book includes hundreds of pre-written scripts that carry out such routine, yet important, system administration tasks as: backing up and clearing event logs; monitoring process use; reading and writing to the registry; and managing user accounts, computer accounts, printers, and services. You can use these scripts as provided, or you can apply the principles of the Microsoft scripting technologies to modify them to meet your exact needs.

Compact Disc

The following contents are included on the Windows 2000 Scripting Guide companion CD:

  • Windows 2000 Scripting Guide (SagSAS.chm). A searchable Help file containing the online version of the Window 2000 Scripting Guide.

  • CD-ROM Release Notes (Readme.txt). The release notes for the contents of Windows 2000 Scripting Guide companion CD.

  • Script repository (Scripts.chm). A searchable Help file containing scripts for use with WMI, ADSI, VBScript, and other Microsoft Scripting technologies.

  • Scriptomatic tool (Scriptomatic.hta). A hypertext application you can use to write WMI scripts.

  • Scriptomatic documentation (Write WMI Scripts Like the Pros.doc). Documentation for the Scriptomatic tool.

  • Windows Script 5.6 (Scripten.exe). The installer for Microsoft® Visual Basic® Script Edition (VBScript) Version 5.6, JScript® Version 5.6, Windows Script Components, Windows Script Host 5.6, and Windows Script Runtime Version 5.6. These are the most recent versions of each technology at this writing and are covered in this book. Please note that this installer runs only on Windows 2000 operating systems.

  • Windows Script 5.6 Documentation (Scrdoc56en.exe). A searchable reference and conceptual Help file for Windows Script 5.6.

  • Microsoft Word viewer. If you do not have Microsoft® Word installed on your computer, install this viewer to see the Scriptomatic documentation.

  • Links to Microsoft Press. Links to the Microsoft Press Support site, which you can search for Knowledge Base articles, and to the Microsoft Press product registration site, which you can use to register this book online.

Document Conventions

The following art symbols and text conventions are used throughout this book.

Scripting Diagram Symbols

Use the following table of symbols as a resource for understanding the scripting graphics included in this book.

Symbol

Meaning

Scripting Diagram Symbols

Object

Scripting Diagram Symbols

Method

Scripting Diagram Symbols

Property

Scripting Diagram Symbols

Event

Scripting Diagram Symbols

Collection object

Scripting Diagram Symbols

Item property of a collection object

Reader Alert Conventions

Reader alerts are used throughout this book to notify you of both supplementary and essential information. The following table explains the meaning of each alert.

Reader Alert

Meaning

Reader Alert Conventions

Tip

Alerts you to supplementary information that is not essential to the completion of the task at hand.

Reader Alert Conventions

Note

Alerts you to supplementary information.

Reader Alert Conventions

Important

Alerts you to supplementary information that is essential to the completion of a task.

Reader Alert Conventions

Caution

Alerts you to possible data loss, breaches of security, or other more serious problems.

Reader Alert Conventions

Warning

Alerts you that failure to take or avoid a specific action might result in physical harm to you or to the hardware.

Command-line Style Conventions

The following style conventions are used in documenting scripting and command-line tasks throughout this book.

Element

Meaning

bold font

Characters that you type exactly as shown, including commands and parameters. User interface elements are also bold.

Italic font

Variables for which you supply a specific value. For example, Filename.ext can refer to any valid file name.

Monospace font

Code samples.

Command

Command that is typed at the command prompt.

Syntax

Syntax of script elements.

Output

Output from running a script.

Support Policy

Microsoft does not support the software supplied in the Windows 2000 Scripting Guide. Microsoft does not guarantee the performance of the scripting examples, job aids, or tools, bug fixes for the tools, or response times for answering questions. However, we do provide a way for customers who purchase the Windows 2000 Scripting Guide to report any problems with the software and receive feedback for such issues. You can do this by sending e-mail to . This e-mail address is only for issues related to the Windows 2000 Scripting Guide. For issues related to the Windows 2000 operating systems, please refer to the support information included with your product.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset