Publisher: Microsoft Press
Pub Date: November 29, 2006
Print ISBN-10: 0-7356-2297-3
Print ISBN-13: 978-0-7356-2297-5
Pages: 512
Covering the Basics
Starting from ScratchRunning Your First Script
Enhancing Your Script
Modifying an Existing Script
Exploring a Script: Step-by-Step Exercises
One Step Further: Customizing an Existing Script
Looping Through the ScriptAdding Power to Scripts
For Each.Next
For.Next
Do While.Loop
Do Until.Loop
Do.Loop
While.Wend
Creating Additional Objects
Using the For Each.Next Command Step-by-Step Exercises
One Step Further: Modifying the Ping Script
Adding IntelligenceIf.Then
If.Then.ElseIf
If.Then.Else
Select Case
Modifying CPUType.vbs Step-by-Step Exercises
One Step Further: Modifying ComputerRoles.vbs
Working with ArraysPassing Arguments
Command-Line Arguments
Using Multiple Arguments
Tell Me Your Name
Working with Arrays
Moving Past Dull Arrays
Two-Dimensional Arrays
Passing Arguments Step-by-Step Exercises
One Step Further: Building Arrays
More ArraysStrings and Arrays
Parsing Passed Text into an Array
Parsing Passed Text
Working with Dictionaries
Using Basic InStr Step-by-Step Exercises
One Step Further: Creating a Dictionary
Part II: Basic Windows Administration
Working with the File SystemCreating the File System Object
File It Under Files
File Properties
File Attributes
Creating Files
Writing to a Text File
Verifying a File Exists
Creating Files Step-by-Step Exercises
One Step Further: Creating a Log File
Working with FoldersWorking with Folders
Automatic Cleanup
Binding to Folders
Copying Folders
Moving Folders
Creating Folders Step-by-Step Exercises
One Step Further: Deleting Folders
Using WMILeveraging WMI
Understanding the WMI Model
Working with Objects and Namespaces
Digging Deeper
Listing WMI Providers
Working with WMI Classes
Querying WMI
Retrieving Hotfix Information Step-by-Step Exercise
One Step Further: Echoing the Time Zone
WMI ContinuedAlternate Ways of Configuring the WMI Moniker
Accepting Defaults
Moniker Security Settings
Using the Default WMI Moniker Step-by-Step Exercises
Invoking the WMI Moniker to Display the Machine Boot Configuration
Including Additional Security Permissions
One Step Further: Using Win32_Environment and VBScript to Learn About WMI
Querying WMITell Me Everything About Everything!
Selective Data from All Instances
Selecting Multiple Properties
Choosing Specific Instances
Using an Operator
Where Is the Where Clause?
Writing an Informative WMI Script Step-By-Step Instructions
One-Step-Further: Obtaining More Direct Information
Part III: Advanced Windows Administration
Introduction to Active Directory Service InterfacesWorking with ADSI
Output Information
Creating Users
Creating OUs Step-by-Step Exercises
One Step Further: Creating Multi-Valued Users
Chapter
12. Writing for ADSIWorking with Users
Modifying the Address Tab Information
Deleting Users
Deleting Users Step-by-Step Exercises
One Step Further: Using the Event Log
Using ADO to Perform SearchesConnecting to Active Directory to Perform a Search
Creating More Effective Queries
Searching for Specific Types of Objects
What Is Global Catalog?
Creating an ADO Query into Active Directory Step-by-Step Exercises
One Step Further: Controlling Script Execution While Querying Active Directory
Configuring Networking ComponentsWMI and the Network
Changing the TCP/IP Settings
Merging WMI and ADSI
Win32_NetworkAdapterConfiguration
Using WMI to Assign Network Settings Step-by-Step Exercises
One Step Further: Combining WMI and ADSI in a Script
Using Subroutines and FunctionsWorking with Subroutines
Creating Users and Logging Results
Header Information
Working with Functions
Using ADSI and Subs, and Creating Users Step-by-Step Exercises
One Step Further: Adding a Logging Subroutine
Chapter
16. Logon ScriptsWorking with IADsADSystemInfo
Using Logon Scripts
Deploying Logon Scripts
Output Information
Adding a Group to a Logon Script Step-by-Step Exercises
One Step Further: Adding Logging to a Logon Script
Working with the RegistryFirst You Back Up
Creating the WshShell Object
Connecting to the Registry
Unleashing the Power of the StdRegProv Class
Creating Registry Keys
Writing to the Registry
Deleting Registry Information
Reading the Registry Using WMI Step-by-Step Exercises
One Step Further: Creating Registry Keys
Working with PrintersWorking with Win32_Printer
Obtaining the Status of Printers
Creating a Filtered Print Monitor
Monitoring Print Queues
Monitoring Print Jobs Step-by-Step Exercises
One Step Further: Checking the Status of a Print Server
Part IV: Scripting Other Applications
Managing IIS 6.0Locating the WMI classes for IIS 6.0
Making the Connection
Creating a Web Site
Backing Up the Metabase Step-by-Step Exercises
One Step Further: Importing the Metabase
Working with Exchange 2003Working with the Exchange Provider
Connecting to MicrosoftExchangeV2
The Exchange_QueueSMTPVirtualServer Class
Header Information
Exchange Public Folders
Exchange_FolderTree
Using the Exchange_Logon Class Step-by-Step Exercises
One Step Further: Using the Exchange_Mailbox Class
Troubleshooting WMI ScriptingIdentifying the Problem
Testing the Local WMI Service
Testing Remote WMI Service
Testing Scripting Interface
Obtaining Diagnostic Information
General WMI Troubleshooting Steps
Working with Logging Step-by-Step Exercises
One Step Further: Compiling MOF files
Part V: Appendices
Appendix A. VBScript Documentation
Constants
VBScript Run-Time Errors
VBScript Syntax Errors
FileSystemObject Object Model
Appendix B. ADSI Documentation
Computer Object Mapping
Domain Object User Interface Mapping
Group Object User Interface Mapping
Object Property Tab
Organizational Unit User Interface Mapping
Printer Object User Interface Mapping
Shared Folder Object User Interface Mapping
User Object User Interface Mapping
Appendix C. WMI Documentation
Win32 Classes
WMI Providers
WMI Scripting API Objects
WMI Log Files
WMI Scripting Object Model
Appendix D. Documentation Standards
Header Information Section
Reference Information Section
Worker Information Section
Output Information Section
Sample of Documentation Use
Variable Naming Conventions
Appendix E. Special Folder Constants
About the Author
Additional Resources for IT Professionals
Microsoft Windows Server
Microsoft Windows Client
Microsoft SQL Server 2005
Microsoft Exchange Server 2003
Scripting
Related Titles
More Great Resources for IT Professionals
Administrator's Pocket Consultant
Administrator's Companion
Resource Kit
Self-Paced Training Kit