Managing Windows with VBScript and WMI.pdf

(2785 KB) Pobierz
This document is created with the unregistered version of Document2PDF Pilot.
< Day Day Up >
Table of Contents
Examples
Managing Windows with VBScript and WMI
By Don Jones
Publisher: Addison Wesley
Pub Date: March 26, 2004
ISBN: 0-321-21334-3
Pages: 640
Slots: 1.0
"Finally, a step-by-step VBScripting book to make you look like a programmer without the time and sweat! Don't
waste your time searching the Internet for examples-this book does it for you!"
-Greg A. Marino, Senior Systems Engineer/Consultant, Westtown Consulting Group, Inc.
Visual Basic Scripting (VBScript) and Windows Management Instrumentation (WMI) are vital tools for systems
administrators grappling with the increasing complexity of Windows technologies. However, busy admins have been
without a straightforward guide to scripting...until now.
Managing Windows(R) with VBScript and WMI explains how Windows administrators can effectively use VBScript
to automate common administrative tasks and simplify complex ones. Detailed coverage of security concerns
provides admins with the means for safely using VBScript in Windows environments. The book is organized around
the problems you face daily, with reusable examples and coverage of Windows NT, Windows 2000, Windows XP,
and Windows 2003.
This user-friendly reference demystifies scripting and then shows you how to produce new scripts from scratch. You
will be producing useful scripts right away as you study the VBScript language and learn how to control nearly every
aspect of the Windows operating system with WMI and the Active Directory Services Interface (ASDI). You will be
able to build your own administrative Web pages and use advanced scripting technologies such as script encryption,
scripting components, and script security. The book closes with still more ready-made example scripts accompanied
by complete line-by-line explanations. The CD includes all the code from the book and trial versions of PrimalScript
3.0 and VbsEdit. A companion Web site provides updates and errata.
Inside you will find answers to such questions as:
How do you write effective logon scripts? Chapter 11
This document is created with the unregistered version of Document2PDF Pilot.
How do you write scripts that query and modify user and group information? Chapter 16
How can you query the IP addresses from multiple network adapters in multiple remote computers? Chapter
19
How can you design, write, run, test, and debug your own administrative Web pages? Chapter 24
How can you reuse code between various scripts? Chapter 25
< Day Day Up >
This document is created with the unregistered version of Document2PDF Pilot.
< Day Day Up >
Table of Contents
Examples
Managing Windows with VBScript and WMI
By Don Jones
Publisher: Addison Wesley
Pub Date: March 26, 2004
ISBN: 0-321-21334-3
Pages: 640
Slots: 1.0
Copyright
Praise for Managing Windows with VBScript and WMI
Preface
Who Should Read This Book?
How to Use This Book
Preparing to Use This Book
Typographical Elements
Acknowledgments
About the Author
Part I: Introduction to Windows Administrative Scripting
Chapter 1. Scripting Concepts and Terminology
What Is Scripting?
Script Hosts
ActiveX Scripting Languages
The Component Object Model ( COM )
Critical Scripting Security Issues
Review
Chapter 2. Running Scripts
Windows Script Host
Command-Line Scripts
Notepad and Script Editors
Writing Your First Script
Running Your First Script
Debugging Your First Script
Review
Chapter 3. The Components of a Script
A Typical VBScript
Functions
Subroutines
Main Script
Comments and Documentation
This document is created with the unregistered version of Document2PDF Pilot.
Review
Chapter 4. Designing a Script
Creating a Task List
Selecting the Appropriate Tools
Creating Modules to Perform Tasks
Validating User Input
Planning for Errors
Creating Script Libraries
Review
Part II: VBScript Tutorial
Chapter 5. Functions, Objects, Variables, and More
What Are Variables?
What Are Functions?
What Are Statements and Subroutines?
What Are Objects?
Review
Chapter 6. Input and Output
Displaying Messages
Asking for Input
Command-Line Parameters as Input
Review
Chapter 7. Manipulating Numbers
Numbers in VBScript
Basic Arithmetic
Advanced Arithmetic
Boolean Math
Converting Numeric Data Types
Converting Other Data Types to Numeric Data
Review
Chapter 8. Manipulating Strings
Strings in VBScript
Working with Substrings
Concatenating Strings
Changing Strings
Formatting Strings
Converting Other Data Types to String Data
Review
Chapter 9. Manipulating Other Types of Data
Working with Dates and Times
Working with Arrays
Working with Bytes
Review
Chapter 10. Controlling the Flow of Execution
Conditional Execution
Loops
Putting It All Together
Review
This document is created with the unregistered version of Document2PDF Pilot.
Chapter 11. Built-in Scripting Objects
The WScript Object
The Network Object
The Shell Object
The Shortcut Object
Review
Chapter 12. Working with the File System
The FileSystemObject Library
Working with Drives
Working with Folders
Working with Files
Reading and Writing Text Files
Other FSO Methods and Properties
Creating a Log File Scanner
Review
Chapter 13. Putting It All Together: Your First Script
Designing the Script
Writing Functions and Subroutines
Writing the Main Script
Testing the Script
Review
Part III: Windows Management Instrumentation and Active Directory Services Interface
Chapter 14. Working with ADSI Providers
Using ADSI Objects
Using the WinNT Provider
Using the LDAP Provider
Other Providers
Review
Chapter 15. Manipulating Domains
Querying Domain Information
Changing Domain Settings
Working with OUs
Putting It All Together
Review
Chapter 16. Manipulating Users and Groups
Creating Users and Groups
Querying User Information
Changing User Settings
Working with Groups
Putting It All Together
Review
Chapter 17. Understanding WMI
The WMI Hierarchy
Exploring WMI's Capabilities
Installing WMI
Using the WMI Tools
Really—It's This Easy
Review
Zgłoś jeśli naruszono regulamin