Configure and troubleshoot Windows Management Instrumentation

Windows Management Instrumentation (WMI) will fail to start or operate properly if the WMI repository is corrupt. Depending on what version of Windows, there are different ways to repair/rebuild/reset the WMI repository:

  • Windows Vista/2008:

    winmgmt /verifyrepository
    winmgmt /salvagerepository

  • Windows XP (Requires atleast SP2):

    rundll32 wbemupgd, UpgradeRepository

  • Windows 2003 (Requires atleast SP1):

    rundll32 wbemupgd, RepairWMISetup

  • Other versions (Note it will reset the ICS and ICF configuration):
    1. winmgmt /clearadap
    2. winmgmt /kill
    3. winmgmt /unregserver
    4. winmgmt /regserver
    5. winmgmt /resyncperf
    6. net stop winmgmt
    7. del %windir%\system32\Wbem\Repository\*.* /s
    8. net start winmgmt
    9. %windir%\system32\wbem\wbemtest.exe

More Info MS Technet - WMI Isn’t Working!
More Info MS KB216738
More Info MS KB266416
More Info MS KB305992
More Info MS KB823775 (Replaces MS KB319101)
More Info MS KB875605

Note if for some obscure reason wanting to disable the WMI service, then WinMgmt.exe will complain, this can be solved by running these commands before disabling:

winmgmt /clearadap
winmgmt /kill
winmgmt /unregserver

To see all parameters for WinMgmt.exe:

winmgmt /?