Chapter 3. The Components of a Script


Every good book has a structure. This book, for example, includes an introduction and some introductory chapters. Most of the book is taken up with explanatory chapters and examples. There’s an appendix, an index, and a table of contents. These elements work together to make the book useful for a variety of purposes, including learning, referencing, and so forth.

Scripts have a structure, too. The main body of the script is a bit like its table of contents, organizing what the script will do. Functions and subroutines are the chapters of the book and perform the actual work. Finally, the comments and documentation ...

Get VBScript, WMI, and ADSI Unleashed: Using VBScript, WMI, and ADSI to Automate Windows® Administration now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.