Making the Connection
To get an idea of the types of data accessible from the CIM_Setting element class, you can use the CIMSettingClass.vbs script. This script also illustrates connecting to the MicrosoftIISv2 namespace and using WMI to query for information.
Option Explicit 'On Error Resume Next Dim strComputer Dim wmiNS Dim wmiQuery Dim objWMIService Dim colItems Dim objItem strComputer = "london" wmiNS = "/root/MicrosoftIISv2" wmiQuery = "select * from CIM_Setting" Set objWMIService = GetObject("winmgmts://" _ & strComputer & wmiNS) Set colItems = objWMIService.ExecQuery(wmiQuery) For Each objItem In colItems WScript.Echo ": " & objItem.Name Next
Header Information
The Header information section of CimSettingClass.vbs, which follows, contains ...
Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.