WBEMTEST – A Tool for Learning About WMI Objects
WBEMTEST is a built-in Windows program which will show you the WMI objects, classes and methods. My best advice is to start with ScriptomaticV2 rather than WBEMTEST. That said, although WBEMTEST is clunky, it does expose more details of each WMI property.
Topics for WBEMTEST
- Launching WBEMTEST
- The Secret to Getting Started with WBEMTEST
- WMI Tutorial Learning Points for WBEMTEST
- Scenario – When to use WBEMTEST
- Summary – WBEMTEST
To launch WBEMTEST, all that you need to do is type the name WBEMTEST in the run dialog box.
This executable is available on Windows 2000 and later machines.
A reminder of our mission: To find the precise names of WMI objects and properties, which we will then use in the heart of our VBScripts. Once you have opened WBEMTEST, there are two crucial points in initializing this tool, knowing what to put in the Connect Namespace box, and finding the Recursive radio button.
I say again, mostly I favour Scriptomatic over WBEMTEST, however if you wish to run WBEMTEST, beware there is knack to getting started, look out for these three settings:.
1) Once you launch WBEMTEST, note that the Namespace says: root\default. We want to change this to CIMV2, so click on the Connect… Button. When a second dialog box appears, crucially, change root\default to root\cimv2, now click another Connect button.
2) Now about 15 buttons should come alive. Click on Enum Classes (Top left button see diagram).
3) Move the radio button to Recursive, and click OK. There is no need to type anything in the Enter superclass name, dialog box. I have to confess that when I am in a rush, instead of selecting Recursive, I click on OK the result is most disappointing. More haste – less speed. So remember Recursive.
You should have reached your goal and now you should see a display of all the CIM objects.
Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft’s operating systems. Fortunately, SolarWinds have created a Free WMI Monitor so that you can discover these gems of performance information, and thus improve your scripts.
Take the guess work out of which WMI counters to use when scripting the operating system, Active Directory or Exchange Server. Give this WMI monitor a try – it’s free.
In many ways WBEMTEST reminds me of ADSI Edit, both tools expose not only the object structure and properties, but also the actual values.
Classes whose names begin with Win32_ are Microsoft extension classes. These represent Windows-specific managed resources. Scroll down the Query Result dialog until you reach the Win32_Process class, and double-click the class name to open the Object editor for Win32_Process dialog. The Object editor dialog reveals the properties and methods of the class that we just selected.
After you run your newly created GetProcesses.vbs script, you can verify the script’s results using WMI Tester. In the Object editor for Win32_Process dialog, click Instances. The resulting Query Result dialog lists the instances of the processes running on your computer. Double-click on a specific process instance to view the details for that instance.
If you need more detail than you see with Scriptomatic or your VBScript editor, then turn to WBEMTEST. By drilling down, you can see the properties, methods and even the values. This knowledge will give you ideas for scripts, moreover you will have the correct spelling of the names for your properties. When it comes to pure WMI research, it this extra properties detail that gives WBEMTEST the edge over Scriptomatic v2.
WBEMTEST is built-in to Windows 2000 and later programs. There are three vital steps to get started. Connect to Root\cimv2, Enum Classes, and click on the Recursive button. Thereafter, you can study the huge amount of detail that WBEMTEST provides about your operating system’s objects and their properties.
If you like this page then please share it with your friends
See more VBScript WMI examples: