Rebuilding the WMI Repository
If you experience WMI application errors or scripts that used to work are no longer working, you may have a corrupted WMI repository. To fix a corrupted WMI repository, use these steps:
Click Start, Run and type cmd.exe
Note: In Windows 7 and Vista, you need to open an elevated Command Prompt window. To do so, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
Type this command and press Enter:
net stop winmgmt
Using Windows Explorer, rename the folder %windir%\System32\Wbem\Repository. (For example, %windir%\System32\Wbem\Repository_bad). %windir% represents the path to the Windows directory, which is typically C:\Windows.
Switch to Command Prompt window, and type the following and press ENTER after each line:
net start winmgmt
Alternatively, you can reboot rather than running the “net start winmgmt” command.
Content Source = http://windowsxp.mvps.org/repairwmi.htm