If you’ve sat in on any of my WMI related classes or conference sessions, I know you’ve heard me talk about using WBEMTest to test WMI connectivity and your WMI queries. WBEMTest has been around as part of Microsoft operating systems for a long time but many administrators have never heard of it. If you are troubleshooting a WMI related script this is the first place you should go, especially when troubleshooting remote server connections and alternate credentials. If you can’t authenticate to the server using WBEMTest, your script is likely to fail as well. Usually if there is a connection error, the error message should lead you in the right direction.
You should also use WBEMTest to test and refine your query. Once you know it works, then copy and paste it into your script (VBScript or PowerShell or anything else for that matter). If you script still has a problem, it is likely not your WMI query because you’ve already verified it works.
I put together a short video demo on how to use WBEMTest. To start it, click Start – Run and type WBEMTEST. The video shows you the rest.
Remember to connect to the right namespace. For the Win32 classes, which is what you’ll primarily be using, it is root\cimv2. Windows XP/2003 use root\default as a default setting so be sure to change it when connecting to those operating systems.
What tools did you use to make this screencast? It works well.
Question, what tool did you use to create the video?
I used Camtasia Studio 5 to make the demo. A great tool that I’ll write more about later.