Windows administrative scription unleashed : using VBScript, WMI, and ADSI to automate Windows administration
If you're a Windows administrator, scripting expertise can liberate you from boring, repetitive work-so you can take on the sophisticated, high-value projects you really want.
Top scripting guru Don Jones has written the definitive administrator's guide to getting results with Microsoft's key scripting technologies: VBScript, WMI, and ADSI. Jones draws on his unsurpassed experience training Windows administrators in conferences, classes, and from his enormously popular site, ScriptingAnswers.com. You'll learn how to use VBScript, WMI, and ADSI to gain administrative control over nearly every aspect of every recent Windows server or client, including Windows Server 2003, Vista, XP, 2000, and NT.
As you gain experience, Jones introduces more advanced techniques, ranging from modular scripting and script encryption to integrating VBScript with HTML code. Jones concludes with a full section of ready-to-run, real-world examples-from logon/logoff scripts to automated domain and network administration, from querying WMI to creating Active Directory groups.
Every script is explained line-by-line, with challenging techniques described in even greater detail. Detailed information on how to... Decide what you can script: a framework for getting started fast Understand how scripts are designed, assembled, and run Master VBScript from start to finish: functions, I/O, data manipulation, program flow, and much more Use scripting objects for tasks ranging from retrieving network information to mapping drives Utilize FileSystemObject to manipulate the Windows filesystem Write ADSI scripts to manipulate any directory service your company uses, from Active Directory to Novell NDS Modify domain information, users, groups, and policies Query WMI information-from basic to advanced Plan for errors, and test and debug your scripts Build your own "resource kit" of reusable script components ON THE WEB:Download all examples and source code presented in this book from ScriptingAnswers.com, where you'll also be able to post follow-up questions directly to the author in a moderated, active community. Introduction 1 Part I: Introduction to Windows Administrative Scripting 11Chapter 1: Scripting Concepts and Terminology 13Chapter 2: Running Scripts 21Chapter 3: The Components of a Script 39Chapter 4: Designing a Script 55 Part II: VBScript Tutorial 73Chapter 5: Functions, Objects, Variables, and More 75Chapter 6: Input and Output 101Chapter 7: Manipulating Numbers 115Chapter 8: Manipulating Strings 129Chapter 9: Manipulating Other Types of Data 145Chapter 10: Controlling the Flow of Execution 155Chapter 11: Built-In Scripting Objects 173Chapter 12: Working with the File System 193Chapter 13: Putting It All Together: Creating Your First Script from Scratch 219 Part III: Windows Management Instrumentation and Active Directory Services Interface 245Chapter 14: Working with ADSI Providers 247Chapter 15: Manipulating Domains 257Chapter 16: Manipulating Users and Groups 271Chapter 17: Understanding WMI 283Chapter 18: Querying Basic WMI Information 299Chapter 19: Querying Complex WMI Information 317Chapter 20: Putting It All Together: Your First WMI/ADSI Script 335Chapter 21: Testing and Debugging WMI and ADSI Queries 357 Part IV: Advanced Scripting Techniques 371Chapter 22: Modular Script Programming 373Chapter 23: Scripts Packaging and Protection 389Chapter 24: Scripting Security 399Chapter 25: Introduction to HTML Applications 409Chapter 26: Debugging Tips, Tools, and Techniques 421 Part V: Ready-to-Run Examples 437Chapter 27: Logon and Logoff Scripts 439Chapter 28: Windows and Domain Administration Scripts 455Chapter 29: Network Administration Scripts 481Chapter 30: WMI and ADSI Scripts 497 Appendix 509Index 523.