Continuing WMI Headaches: WMI Diagnosis Utility


In my last post on WMI Headaches, I mentioned a tool from Microsoft for diagnosing problems with WMI services. This tool is called the WMI Diagnosis Utility and it provides an in-depth analysis of all things WMI. It has pointed me in the right direction a number of times.

The utility is a giant (and by giant I mean 30,000 line) VB Script file. You’ll want to run it with the cscript.exescript host so that you can see some progress as it runs. If you run it with wscript.exe (which is the default graphical VB Script host) it’ll run in the background and you won’t see status. 

Running WMIDiag.vbs

It can take quite a while to run, particularly on a slower machine or if there are a lot of WMI providers installed. I’ve never seen it take more than 15 minutes, but I’ve heard it can sometimes double that. On my super-macho machine with a relatively small WMI installation, it took just over 3 minutes.

Once the test is run, you’ll get a long diagnostic report. The more errors there are, the longer it will be. Search for the words ERROR and WARNING. There is a summary at the bottom to tell you how many errors there are.

In the screen shot below, I’ve highlighted a couple of the more common types of errors (and snipped a bunch of stuff between them.) You’ll see that the file recommends what to do to correct the problems. In the case of the permissions error we have a free utility called
which will allow you to correct it remotely.

WMIDiag Report
WMIDiag Report

In summary, if you have a problems with WMI errors this utility is very valuable for rooting out the causes. It doesn’t always identify the problem in a handful of cases, but for the most part you can count on it to narrow things down.