April 2004
Beginner
416 pages
11h 3m
English
In this lab, you explore an alternate method of invoking the WMI moniker. In so doing, you write a WMI script that displays the boot configuration of a machine.
Open Notepad.exe.
On the first line, specify Option Explicit to ensure all variables utilized are declared.
Declare three variables (using the same variables we declared in Lab 18a). The variables are objWMIService, colItems, and objItem.
Set objWMIService equal to what comes back from the GetObject method when used in conjunction with the WMI moniker. In addition, define an impersonation level of Anonymous. Your code will look like the following:
Set objWMIService = GetObject("winmgmts:{impersonationLevel=anonymous}") ...