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 /?


  1. Tim Ewald says:

    Great information! Saved me a lot of hair pulling. Thanks!

  2. badr says:

    thank you soo much that was soo helpfull . you are the master :)

  3. Torii Tom says:

    The first command (rundll32 wbemupgd, UpgradeRepository) worked on my PC; thank you very much.

  4. Qiss says:

    Great Great Great !!!
    (rundll32 wbemupgd, UpgradeRepository) worked for me, (i typed it in the RUN console in the START menu, if your reading this and wondering where to type it.)
    Thx alot man, great site and great work....more power to you....cheers again and take it easy.

  5. SHERIFF says:

    Big thnx!
    It working!!!

  6. Hydra says:

    You are a genius! I've been hunting for days to find this fix and the first thing I've tried on your site did it. Absolutely the best!

  7. bilal says:

    yes. this is exactly what i needed thanks

  8. Hans says:

    "Die Eigenschaften der Verbindung k├Ânnen nicht angezeigt werden."....
    This solved it.

  9. KevinG IT Asst says:

    After searching for 2 hours I found your info. W2k8 Svr St. So simple winmgmt /salvagerepository fixed my WMI and GPO event log related issues. ThanX

  10. Steph says:

    Wonderful - thanks so much!!!!

  11. Ryan says:

    Should add this for Win 7:

    winmgmt /resetrepository

  12. Akos says:

    I was close to jumping out of the window(s (TM)). But my XP SP2 revived WMI after following your instructions

    Thanks a lot.

  13. Anon says:

    You are worth your weight in gold. This fixed the following for me:
    * programs failing to install with an error of failing to connect to Windows Installer
    * unable to connect to WMI Tester
    * When checking Dependencies tab in Services had some error about service dependencies interface class not registered.

  14. Anon says:

    I also found this script useful as found here:

    @echo on
    cd /d c:\temp
    if not exist %windir%\system32\wbem goto TryInstall
    cd /d %windir%\system32\wbem
    net stop winmgmt
    winmgmt /kill
    if exist Rep_bak rd Rep_bak /s /q
    rename Repository Rep_bak
    for %%i in (*.dll) do regsvr32 -s %%i
    for %%i in (*.mof,*.mfl) do Mofcomp %%1
    net start winmgmt
    goto end

    if /I (%1) == (wbemcntl.exe) goto End
    if /I (%1) == (mofcomp.exe) goto End
    %1 /RegServer

    if not exist wmicore.exe goto End
    wmicore /s
    net start winmgmt

    This script basically re-registers all *.dll, *.mof and *.mfl files related to the service

    However I needed to change this line from:
    for %%i in (*.mof,*.mfl) do Mofcomp %%1
    for %%i in (*.mof,*.mfl) do Mofcomp %%i
    ^ Changed the number 1 to a letter i.

  15. Devulsky says:

    Thank you! Repair/rebuild/reset the WMI repository works. Now my Windows 7 is not freezen anymore.

  16. Tonimoroni says:

    Took me all day to find you, but so worth it.

    I just cut and pasted this - rundll32 wbemupgd, UpgradeRepository - into Run box and WMI was restored in XP.

    Thank you so much!

  17. Rick K says:

    Did the trick. Saved me from crazy and going thru a lot of crap.

    Much Appreciated

Leave a Reply

Your email address will not be published. Required fields are marked *