Synopses & Reviews
Automate everyday administrative tasks--and take greater control of your Windows networks--with this hands-on guide to scripting. Your instructor, a Microsoft Certified Trainer with more than a decade of enterprise consulting experience, expertly builds your scripting expertise with labs and lessons you complete at your own pace. From writing your first scripts from scratch with Microsoft Visual Basic Scripting Edition (VBScript) and Windows Script Host (WSH)--to exploring the programmatic advantages of using Windows Management Instrumentation (WMI) and Active Directory Service Interface (ADSI)--you'll learn timesaving ways to set up, deploy, and manage your Windows-based systems.
Teach yourself how to write and run scripts to: Automate folder and file management--including performing multiple functions-within a single scriptConfigure network components using WMIPerform global--or select--changes to users and groups in Active Directory directory service using ADSIDesign logon scripts that increase system manageability and configurabilityMonitor and manage printersEdit the registry--avoiding common pitfallsTrack and respond to critical eventsSimplify user management for Microsoft Exchange ServerStreamline IIS website administration--including creating consistent security configurations
PLUS--Get 100+ script samples on CD you can use or customize to help simplify the management of your system resources
Get 100+ sample scripts plus an eBook inside.
CD features: More than 100 sample scripts to adapt for your own workTimesaving scripting tools--including Script-o-Matic 1.0 and an evaluation version of PrimalScriptFully searchable electronic version of the book
A Note Regarding the CD or DVD
The print version of this book ships with a CD or DVD. For those customers purchasing one of the digital formats in which this book is available, we are pleased to offer the CD/DVD content as a free download via OReilly Medias Digital Distribution services. To download this content, please visit OReillys web site, search for the title of this book to find its catalog page, and click on the link below the cover image (Examples, Companion Content, or Practice Files). Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to email@example.com.
Target Audience: IT professionalsAbout the Technology: Windows XP, Windows Server 2003, Windows Scripting Host 5.6, VBScript
Get expert guidance on how to use scripting to automate Windows system administration--straight from the Microsoft scripting experts. This title features hands-on, self-paced learning exercises, timesaving tips, and sample scripts to help readers get more done in less time.
Full Title:-"Microsoft Windows Scripting Self-Paced Learning Guide"
Automate everyday administrative tasks—and take greater control of your Windows networks—with this hands-on guide to scripting. Your instructor, a Microsoft Certified Trainer with more than a decade of enterprise consulting experience, expertly builds your scripting expertise with labs and lessons you complete at your own pace. From writing your first scripts from scratch with Microsoft Visual Basic Scripting Edition (VBScript) and Windows Script Host (WSH)—to exploring the programmatic advantages of using Windows Management Instrumentation (WMI) and Active Directory Service Interface (ADSI)—you’ll learn timesaving ways to set up, deploy, and manage your Windows-based systems.
Teach yourself how to write and run scripts to:
- Automate folder and file management—including performing multiple functions-within a single script
- Configure network components using WMI
- Perform global—or select—changes to users and groups in Active Directory directory service using ADSI
- Design logon scripts that increase system manageability and configurability
- Monitor and manage printers
- Edit the registry—avoiding common pitfalls
- Track and respond to critical events
- Simplify user management for Microsoft Exchange Server
- Streamline IIS website administration—including creating consistent security configurations
PLUS—Get 100+ script samples on CD you can use or customize to help simplify the management of your system resources
Get 100+ sample scripts plus an eBook inside.
- More than 100 sample scripts to adapt for your own work
- Timesaving scripting tools—including Script-o-Matic 1.0 and an evaluation version of PrimalScript
- Fully searchable electronic version of the book
For customers who purchase an ebook version of this title, instructions for downloading the CD files can be found in the ebook.
About the Author
Ed Wilson is a well-known scripting expert who delivers popular scripting workshops to Microsoft customers and employees worldwide. He's written several books on Windows scripting, including Windows PowerShell 2.0 Best Practices, Microsoft Windows PowerShell Step By Step, and Microsoft VBScript Step by Step. Ed is a senior consultant at Microsoft Corporation and writes Hey, Scripting Guy!, one of the most popular TechNet blogs.
Table of Contents
Acknowledgments; About This Book; A Practical Approach to Scripting; Is This Book for Me?; Outline of This Book; About the Companion CD; System Requirements; Part 1: Covering the Basics; Chapter 1: Starting from Scratch; 1.1 Before You Begin; 1.2 Running Your First Script; 1.3 Enhancing Your Script; 1.4 Modifying an Existing Script; 1.5 Summary; 1.6 Quiz Yourself; 1.7 On Your Own: Lab 1 Exploring a VBScript; 1.8 Lab 2 Customizing an Existing Script; Chapter 2: Getting in the Loop; 2.1 Before You Begin; 2.2 Adding Power to Scripts; 2.3 For Each...Next; 2.4 For...Next; 2.5 Do While...Loop; 2.6 Do Until...Loop; 2.7 Summary; 2.8 Quiz Yourself; 2.9 On Your Own: Lab 3 Using the For Each...Next Command; 2.10 Lab 4 Modifying the Ping Script; Chapter 3: Adding Intelligence; 3.1 Before You Begin; 3.2 If...Then; 3.3 If...Then...ElseIf; 3.4 If...Then...Else; 3.5 Select Case; 3.6 Summary; 3.7 Quiz Yourself; 3.8 On Your Own: Lab 5 Modifying CPUType.vbs; 3.9 Lab 6 Modifying ComputerRoles.vbs; Chapter 4: The Power of Many; 4.1 Before You Begin; 4.2 Passing Arguments; 4.3 Command-Line Arguments; 4.4 Using Multiple Arguments; 4.5 Tell Me Your Name; 4.6 Working with Arrays; 4.7 Moving Past Lame Arrays; 4.8 Two-Dimensional Arrays; 4.9 Summary; 4.10 Quiz Yourself; 4.11 On Your Own: Lab 7 Working with Passing Arguments; 4.12 Lab 8 Building Arrays; 4.13 Lab 9 Modifying a Script; Chapter 5: The Power of Many More; 5.1 Before you Begin; 5.2 Strings and Arrays; 5.3 Parsing Passed Text into an Array; 5.4 Parsing Passed Text; 5.5 Working with Dictionaries; 5.6 Summary; 5.7 Quiz Yourself; 5.8 Own Your Own: Lab 10a Implementing Basics for the InStr Command; 5.9 Lab 10b Understanding Advanced Features of the InStr Command; 5.10 Lab 11 Creating a Dictionary; Part 2: Basic Windows Administration; Chapter 6: Working with the File System; 6.1 Before You Begin; 6.2 Creating File System Object; 6.3 File It Under Files; 6.4 File Properties; 6.5 File Attributes; 6.6 A File, a File, I Need to Create a File; 6.7 Writing to a Text File; 6.8 Existential File Approaches; 6.9 Summary; 6.10 Quiz Yourself; 6.11 On Your Own: Lab 12 Creating Files; 6.12 Lab 13 Creating a Log File; Chapter 7: Fun with Folders; 7.1 Before You Begin; 7.2 Working with Folders; 7.3 Automatic Cleanup; 7.4 Binding to Folders; 7.5 Copying Folders; 7.6 Moving On Up; 7.7 Summary; 7.8 Quiz Yourself; 7.9 On Your Own: Lab 14 Creating Folders; 7.10 Lab 15 Deleting Folders; Chapter 8: Why Windows Management Instrumentation?; 8.1 Before You Begin; 8.2 What Is WMI?; 8.3 Providers; 8.4 Adding a Touch of Class; 8.5 Querying WMI; 8.6 Summary; 8.7 Quiz Yourself; 8.8 On Your Own: Lab 16 Retrieving Hotfix Information; 8.9 Lab 17 Echoing the Time Zone; Chapter 9: WMI Continued; 9.1 Before You Begin; 9.2 Alternate Ways of Configuring the WMI Moniker; 9.3 Accepting Defaults; 9.4 Moniker Security Settings; 9.5 Summary; 9.6 Quiz Yourself; 9.7 On Your Own: Lab 18a Using the Default WMI Moniker; 9.8 Lab 18b Invoking the WMI Moniker to Display the Machine Boot Configuration; 9.9 Lab 18c Including Additional Security Permissions; 9.10 Lab 19 Using Win32_Environment and VBScript to Learn About WMI; Chapter 10: Using WMI Queries; 10.1 Before you Begin; 10.2 Tell Me Everything About Everything!; 10.3 Next; 10.4 Worker and Output Information; 10.5 Selective Data from All Instances; 10.6 Selecting Multiple Properties; 10.7 Specifying Specifics; 10.8 Smooth Operator; 10.9 Where Is the Where Clause?; 10.10 Summary; 10.11 Quiz Yourself; 10.12 On Your Own: Lab 20 Writing an Informative WMI Script; 10.13 Lab 21a Obtaining More Direct Information; 10.14 Lab 21b Using a More Complicated Where Clause; Part 3: Advanced Windows Administration; Chapter 11: Introduction to Active Directory Service Interfaces; 11.1 Before you Begin; 11.2 Working with ADSI; 11.3 Output Information; 11.4 Creating Users; 11.5 Summary; 11.6 Quiz Yourself; 11.7 On Your Own: Lab 22 Creating OUs; 11.8 Lab 23 Creating Multi-Valued Users; Chapter 12: Reading and Writing for ADSI; 12.1 Before You Begin; 12.2 Working with Users; 12.3 Creating the Second Page; 12.4 Deleting Users; 12.5 Summary; 12.6 Quiz Yourself; 12.7 On Your Own: Lab 24 Deleting Users; 12.8 Lab 25 Using the Event Log; Chapter 13: Searching Active Directory; 13.1 Before You Begin; 13.2 Connecting to Active Directory to Perform a Search; 13.3 Creating More Effective Queries; 13.4 Searching for Specific Types of Objects; 13.5 What is Global Catalog?; 13.6 Summary; 13.7 Quiz Yourself; 13.8 On Your Own: Lab 26 Creating an ADO Query into Active Directory; 13.9 Lab 27 Controlling How a Script Executes Against Active Directory; Chapter 14: Configuring Networking Components; 14.1 Before You Begin; 14.2 WMI and the Network; 14.3 Changing the TCP/IP Settings; 14.4 Merging WMI and ADSI; 14.5 Win32_NetworkAdapterConfiguration; 14.6 Summary; 14.7 Quiz Yourself; 14.8 On Your Own: Lab 28 Using WMI to Assign Network Settings; 14.9 Lab 29 Combining WMI and ADSI in a Script; Chapter 15: Subs and Other Round Things; 15.1 Before You Begin; 15.2 Working with Subroutines; 15.3 Creating Users and Logging Results; 15.4 Summary; 15.5 Quiz Yourself; 15.6 On Your Own: Lab 30 Using ADSI and Subs, and Creating Users; 15.7 Lab 31 Adding a Logging Subroutine; Chapter 16: Logon Scripts; 16.1 Before You Begin; 16.2 Working with IADsADSystemInfo; 16.3 Using Logon Scripts; 16.4 Deploying Logon Scripts; 16.5 Output Information; 16.6 Summary; 16.7 Quiz Yourself; 16.8 On Your Own: Lab 32 Adding a Group to a Logon Script; 16.9 Lab 33 Adding Logging to a Logon Script; Chapter 17: Working with the Registry; 17.1 Before You Begin; 17.2 First You Back Up; 17.3 Creating the WshShell Object; 17.4 Connecting to the Registry; 17.5 Unleashing StdRegProv; 17.6 Creating Registry Keys; 17.7 Writing to the Registry; 17.8 Deleting Registry Information; 17.9 Summary; 17.10 Quiz Yourself; 17.11 On Your Own: Lab 34 Reading the Registry Using WMI; 17.12 Lab 35 Creating Registry Keys; Chapter 18: Working with Printers; 18.1 Before You Begin; 18.2 Working with Win32_Printer; 18.3 Obtaining the Status of Printers; 18.4 Creating a Filtered Print Monitor; 18.5 Monitoring Print Queues; 18.6 Summary; 18.7 Quiz Yourself; 18.8 On Your Own: Lab 36 Monitoring Print Jobs; 18.9 Lab 37 Checking the Status of a Print Server; Part 4: Scripting Other Applications; Chapter 19: Managing IIS 6.0; 19.1 Before You Begin; 19.2 Whats in a Name?; 19.3 Making the Connection; 19.4 Creating a Website; 19.5 Summary; 19.6 Quiz Yourself; 19.7 On Your Own: Lab 38 Backing Up the Metabase; 19.8 Lab 39 Importing the Metabase; Chapter 20: Working with Exchange 2003; 20.1 Before You Begin; 20.2 Working with the Exchange Provider; 20.3 Connecting to MicrosoftExchangeV2; 20.4 Exchange Public Folders; 20.5 Exchange_FolderTree; 20.6 Summary; 20.7 Quiz Yourself; 20.8 On Your Own: Lab 40 Using the Exchange_Logon Class; 20.9 Lab 41 Using the Exchange_Mailbox Class; Part 5: Appendices; Appendix A: VBScript Documentation; Constants; VBScript Run-Time Errors; VBScript Syntax Errors; Appendix B: ADSI Documentation; Computer Object Mapping; Domain Object User Interface Mapping; Group Object User Interface Mapping; Object Property Sheet; 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; Appendix D: Documentation Standards; Header Information Section; Reference Information Section; Worker Information Section; Sample of Documentation Use; About the Author;