Troubleshooting Problems with WMI Scripts and the WMI Service
Before you begin repairing suspected problems with the WMI service it is strongly recommended that you run the new WMI Diagnosis Utility. You should always run this utility before making any changes to the WMI service.
WMI is a resilient piece of software. For example, suppose the WMI service is stopped, yet you still try running a WMI script. What do you think will happen? Will the script fail? Will the computer lock up? Will the very fabric of space and time be ripped apart? Not exactly. Instead, the WMI service will probably just restart itself and run your script. Most likely you will never even know that the service had been stopped.
Is there a lesson in that for script writers? You bet there is: if you are having problems with a WMI script, don’t jump to conclusions and assume that WMI is broken. If you have a script that doesn’t work it’s usually due to a problem with the script and not due to a problem with WMI. Admittedly, you could encounter a catastrophic failure of WMI itself, a failure that requires you to re-register all the WMI components or to rebuild the WMI repository. However, it’s far more likely that any problems you are experiencing are the result of doing something like typing in an incorrect namespace or trying to connect to a remote computer where you do not have local Administrator rights.