Tip 45: WBEMTEST, the underappreciated tool
This tip is for all versions of Windows, Windows NT and up.
One of my favorite built in tools in Windows is Wbemtest.exe. It is not the prettiest program ever created, but the power to find out information on your computer and other computers on the network is second to none. This tool should be in the tool belt of any administrator that does SCCM, SMS, VBScript, PowerShell or anyone who wants to know more about the settings of their, or other, computers.
One fun thing to do with Wbemtest.exe is just browse the WMI classes to see what type of information you can see about a computer. To do this, start Wbemtest.exe and click the Connect button. For most cases you will leave the Namespace, if the computer you are on has another Namespace set, change it to rootcimv2. You can also enter credentials other than your current credentials, or connect to remote computers by changing the Namespace to \computernamerootcimv2.
To view all of the classes available in the cimv2 namespace select Recursive and click OK.
Depending on the OS version you will have from a few hundred classes to > 1000 classes. Scroll down and double click the Win32_ComputerSystem class.
This is the Win32_ComputerSystem class definition, to view the actual data of your computer click the Instances button.
Double click the result.
The Object editor window has the class and the actual data for your computer, or if you connected to a remote computer, the remote computer’s data.
If you know the WMI class of the object, you can use the Query button to run a WQL query that returns just the information you want.
This query will return an instance of the Win32_ComputerSystem class for the computer THECHADLAPTOP.
Wbemtest is very useful for creating VB and PowerShell scripts, for finding information on a Windows Server Core server, creating Group Policy WMI filters in Active Directory and much more.
Have you ever used Wbemtest? If so, what have you use it for?
For more details on Wbemtest.exe see this article from the Scripting Eye for the GUI Guy; http://technet.microsoft.com/en-us/library/ee692770.aspx.