Preface | p. xxi |
Acknowledgments | p. xxxv |
About the Author | p. xxxvii |
Introduction to Windows Administrative Scripting | p. 1 |
Scripting Concepts and Terminology | p. 3 |
What Is Scripting? | p. 3 |
Script Hosts | p. 4 |
ActiveX Scripting Languages | p. 6 |
The Component Object Model (COM) | p. 9 |
Critical Scripting Security Issues | p. 9 |
Review | p. 10 |
Running Scripts | p. 11 |
Windows Script Host | p. 11 |
Command-Line Scripts | p. 13 |
Notepad and Script Editors | p. 16 |
Writing Your First Script | p. 23 |
Running Your First Script | p. 25 |
Debugging Your First Script | p. 25 |
Review | p. 26 |
The Components of a Script | p. 29 |
A Typical VBScript | p. 29 |
Functions | p. 32 |
Subroutines | p. 33 |
Main Script | p. 34 |
Comments and Documentation | p. 40 |
Review | p. 45 |
Designing a Script | p. 47 |
Creating a Task List | p. 48 |
Selecting the Appropriate Tools | p. 50 |
Creating Modules to Perform Tasks | p. 57 |
Validating User Input | p. 63 |
Planning for Errors | p. 63 |
Creating Script Libraries | p. 66 |
Review | p. 66 |
Vbscript Tutorial | p. 69 |
Functions, Objects, Variables, and More | p. 71 |
What Are Variables? | p. 72 |
What Are Functions? | p. 82 |
What Are Statements and Subroutines? | p. 89 |
What Are Objects? | p. 92 |
Review | p. 97 |
Input and Output | p. 99 |
Displaying Messages | p. 99 |
Asking for Input | p. 107 |
Command-Line Parameters as Input | p. 110 |
Review | p. 114 |
Manipulating Numbers | p. 117 |
Numbers in VBScript | p. 117 |
Basic Arithmetic | p. 118 |
Advanced Arithmetic | p. 121 |
Boolean Math | p. 124 |
Converting Numeric Data Types | p. 129 |
Converting Other Data Types to Numeric Data | p. 130 |
Review | p. 130 |
Manipulating Strings | p. 133 |
Strings in VBScript | p. 133 |
Working with Substrings | p. 135 |
Concatenating Strings | p. 139 |
Changing Strings | p. 141 |
Formatting Strings | p. 143 |
Converting Other Data Types to String Data | p. 144 |
Review | p. 145 |
Manipulating Other Types of Data | p. 147 |
Working with Dates and Times | p. 147 |
Working with Arrays | p. 150 |
Working with Bytes | p. 155 |
Review | p. 156 |
Controlling the Flow of Execution | p. 157 |
Conditional Execution | p. 158 |
Loops | p. 164 |
Putting It All Together | p. 170 |
Review | p. 173 |
Built-in Scripting Objects | p. 175 |
The WScript Object | p. 175 |
The Network Object | p. 176 |
The Shell Object | p. 183 |
The Shortcut Object | p. 190 |
Review | p. 192 |
Working with the File System | p. 193 |
The FileSystemObject Library | p. 193 |
Working with Drives | p. 194 |
Working with Folders | p. 197 |
Working with Files | p. 204 |
Reading and Writing Text Files | p. 207 |
Other FSO Methods and Properties | p. 211 |
Creating a Log File Scanner | p. 212 |
Review | p. 221 |
Putting It All Together: Your First Script | p. 223 |
Designing the Script | p. 224 |
Writing Functions and Subroutines | p. 227 |
Writing the Main Script | p. 232 |
Testing the Script | p. 240 |
Review | p. 251 |
Windows Management Instrumentation and Active Directory Services Interface | p. 253 |
Working with ADSI Providers | p. 255 |
Using ADSI Objects | p. 255 |
Using the WinNT Provider | p. 257 |
Using the LDAP Provider | p. 260 |
Other Providers | p. 263 |
Review | p. 263 |
Manipulating Domains | p. 265 |
Querying Domain Information | p. 265 |
Changing Domain Settings | p. 267 |
Working with OUs | p. 268 |
Putting It All Together | p. 273 |
Review | p. 279 |
Manipulating Users and Groups | p. 281 |
Creating Users and Groups | p. 281 |
Querying User Information | p. 284 |
Changing User Settings | p. 285 |
Working with Groups | p. 286 |
Putting It All Together | p. 288 |
Review | p. 292 |
Understanding WMI | p. 293 |
The WMI Hierarchy | p. 293 |
Exploring WMI's Capabilities | p. 296 |
Installing WMI | p. 301 |
Using the WMI Tools | p. 302 |
Really--It's This Easy | p. 304 |
Review | p. 309 |
Querying Basic WMI Information | p. 311 |
The WMI Query Language (WQL) | p. 311 |
Determining What to Query | p. 316 |
Testing the Query | p. 319 |
Writing the Query in VBScript | p. 321 |
Using the Query Results | p. 326 |
Alternative Methods | p. 328 |
Review | p. 329 |
Querying Complex WMI Information | p. 331 |
Understanding WMI Relationships | p. 331 |
Associating WMI Instances | p. 336 |
Writing the Query | p. 340 |
Testing the Query | p. 341 |
Writing the Query in VBScript | p. 341 |
Another Example | p. 345 |
Review | p. 349 |
Putting It All Together: Your First WMI/ADSI Script | p. 351 |
Designing the Script | p. 351 |
Writing Functions and Subroutines | p. 357 |
Writing the Main Script | p. 360 |
Testing the Script | p. 369 |
Review | p. 374 |
Creating Administrative Web Pages | p. 375 |
Active Server Pages Crash Course | p. 377 |
About ASP | p. 378 |
VBScript in ASP | p. 379 |
The Response Object | p. 381 |
The Request Object | p. 384 |
A Sample ASP Script | p. 385 |
Testing ASP Scripts | p. 389 |
Review | p. 391 |
Adding Administrative Script to a Web Page | p. 393 |
The Basic Web Page | p. 393 |
Adding Functions and Subroutines | p. 396 |
Adding Inline Script | p. 397 |
The Result | p. 403 |
Review | p. 417 |
Web Page Security Overview | p. 419 |
The ASP Security Context | p. 419 |
Prohibited Behaviors | p. 423 |
IIS 4.0, 5.0, and 5.1 versus IIS 6.0 | p. 424 |
NTFS and IIS Security | p. 427 |
Writing Secure ASP Code | p. 427 |
Review | p. 431 |
Putting It All Together: Your First Administrative Web Pages | p. 433 |
Checking User Account Status | p. 433 |
Administering IIS | p. 443 |
Review | p. 460 |
Advanced Scripting Techniques | p. 461 |
Modular Script Programming | p. 463 |
Introduction to Windows Script Components | p. 463 |
Scripting and XML | p. 465 |
Review | p. 474 |
Using Script Components | p. 475 |
Obtaining the Component | p. 475 |
Reviewing the Component | p. 476 |
Using the Component | p. 477 |
Review | p. 479 |
Encoded Scripts | p. 481 |
Installing the Script Encoder | p. 482 |
Writing Encoded Scripts | p. 482 |
Running Encoded Scripts | p. 485 |
Review | p. 486 |
Scripting Security | p. 487 |
Why Scripting Can Be Dangerous | p. 487 |
Security Improvements in Windows XP and Windows Server 2003 | p. 488 |
Digitally Signing Scripts | p. 490 |
Running Only Signed Scripts | p. 493 |
Ways to Implement Safe Scripting | p. 494 |
Review | p. 495 |
Ready-to-Run Examples | p. 497 |
Logon and Logoff Scripts | p. 499 |
NT and Active Directory Logon Scripts | p. 500 |
Active Directory-Specific Logon Scripts | p. 507 |
Active Directory Logoff Scripts | p. 513 |
Review | p. 516 |
Windows and Domain Administration Scripts | p. 517 |
Automating User Creation | p. 517 |
Finding Inactive Users | p. 527 |
Collecting System Information | p. 533 |
Review | p. 539 |
Network Administration Scripts | p. 541 |
Shutting Down Remote Computers | p. 541 |
Listing Remote Shares | p. 544 |
Finding Out Who Has a File Open | p. 547 |
Uninstall Remote MSI Packages | p. 549 |
Adding Users from Excel | p. 553 |
Listing Hot Fixes and Software | p. 562 |
Review | p. 566 |
WMI and ADSI Scripts | p. 567 |
The All-Purpose WMI Query Script | p. 567 |
The All-Purpose WMI Update Script | p. 569 |
The All-Purpose ADSI Object Creation Script | p. 571 |
The All-Purpose ADSI Object Query Script | p. 572 |
The All-Purpose ADSI Object Deletion Script | p. 573 |
Mass Password Changes with ADSI | p. 574 |
Review | p. 576 |
Appendix | p. 577 |
Administrator's Quick Script Reference | p. 579 |
Index | p. 591 |
Table of Contents provided by Ingram. All Rights Reserved. |
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.