The Platform SDK is loaded with great documentation on VBScript, the Windows Scripting Host, WMI, ADSI and all that. It is like an entire encyclopedia dedicated to programming and scripting. With this in mind, finding good stuff to read can be a little daunting. To this end I have included some good things you may wish to search on and peruse at your leisure. By including some of these search strings you force the search engine to remove some of the dross.
"Windows Script Host object model" - The Windows Script Host object model consists of 14 objects. The root object is the WScript object. Look over each of the 14 objects, and see which may be useful to you.
"Receiving a WMI Event"
“Registering for System Registry Events”
"WshController Object" - The WshController object allows you to create a controller script that can run worker scripts against remote computers. The controller script initiates, monitors, and, if necessary, terminates the worker script. The worker script, meanwhile, is simply the script that carries out the administrative task — for example, adding a printer connection or mapping a network drive.
"WshRemote Object" - The WshRemote object allows you to remotely administer computer systems on a computer network. It works in conjunction with WshController Object. Several nice articles on this.
"VBScript Features" – a table that lists all the features in VBScript
“inputbox function” – creates a input box dialog box.
“msgBox function” – allows you to create a message box for output. Allows you to customize the title, and icons.
VBScript statements – do not include quotes. It is partly down list in section called Microsoft Scripting Technologies, and is called simply Statements. This is a list of all the statements available to you in VBScript.
“Search Scope” – in directory Services look at “setting the Search Scope” talks about the three levels: base, oneLevel, and SubTree. The “search Scope” article itself goes into detail as to what these are and how used.
“ldap search” - find the article called LDAP Dialect under directory services. Talks about the four parts of a LDAP search string, the different providers for LDAP (only ADO is supported with VBScript).
“WshShell Object” – this is what you get when you use CreateObject ("WScript.Shell") in your script. If you are interested in what all it can do besides just reading from the registry then read up on it. In particular pay attention to the WshShellObject Properties and Methods.
“Open TextFile Method” – this is used when you want to open a text file and write, read or append to it. There are some cool things you can do with this.
“FileSystemObject Methods” – this tells you all the things you can do with the file system object. For instance, you can copy files, delete files, folders, and the like. But there is MUCH MUCH more you can do with this very powerful object.
“WshScriptExec Object” – this is one way to find information about a script Provides run with Exec along with access to the StdIn, StdOut, and StdErr streams.
“Exec Method” - Runs an application in a child command-shell, providing access to the StdIn/StdOut/StdErr streams.
“Executing Privileged Operations Using VBScript” – there are times when you need additional privileges when running a WMI script. This article will point you in the right direction. Pay attention to the sectioni on Setting a Privilege as Part of a Moniker.
“Enumerating WMI” – Enumeration is what you do when you walk through a collection. Interestingly enough, you can use WMI to learn about WMI. There are a number of WMI classes you can use to learn about WMI. You may, for example want to use the SWbemServices.InstancesOf class.
“Querying WMI” – Want to know how to make your WMI queries perform better? Then take at look at the differences between a synchronous query and an asynchronous query.
“Querying with WQL” – all the cool things you can query with WMI query language.
“iadscontainer” - The IADsContainer interface enables an ADSI container object to create, delete, and manage contained ADSI objects. This is the actual interface you are using when you create, delete users and objects in Active Directory.
“ADS_USER_FLAG_ENUM” – these flags are used for setting user properties in active directory. They correspond to values in the userAccountControl attribute. Why are these important? Well if you want to enable or disable a user account, then you will be using these things.
“Searching with ActiveX Data Objects (ADO) – discusses the ADO model for searching AD.
“Creating a Query Filter” – in the directory services section. Talks about filter the results that come back from AD when using the LDAP query syntax.
“LDAP dialect” – information on using LDAP query statements.
“SQL dialect” – information on using SQL dialect to search Active directory
“Binding to the Global Catalog” – in directory services. The global catalog contains a partial replica of every domain directory. It is stored only on certain domain controllers. You can use the GC: moniker to specify a global catalog server for your queries.
“Operating System Classes” – in Windows Management Instrumentation. Nice grouping of various WMI classes related to subcategories of the OS.
“Performance Counter Classes” – allows you to access performance data (such as you would see in Performance monitor) via a VBScript! There are two kinds – Raw and cooked. I prefer the cooked kind my self! This article is in the Windows Management Instumentation section and it can take you to new hights in your scripting.
“IADsADSystemInfo” - The IADsADSystemInfo interface gets data about the local computer in a W2k or W2k3 AD domain.
“__SystemSecurity” - System class contains methods that let you access and modify the security settings for a namespace.
© Copyright 2004, Ed Wilson All Rights Reserved.