none
WMI corrupt - how to reinstall/repair?

    Question

  • Hi,

    WMI Control\General reports "Failed to connect to <local computer> because of "WMI: Generic failure". The same also displayed in services.msc and Service\Dependencies attribute.

    Executing a restore from last backup file does not change a thing. WMI service is running. Running winmgmt /verifyrepository (or salvagerepository) completes with success as long as WMI is stopped. If started the same error is displayed.

    The WMidiag is too old for Windows Server 2008 (I haven't found a 2008 version), and is incorrectly reporting missing files.

    I have not found any means to remedy this, nor reinstalling WMI. Do I have to run OS installation+repair?

     Regards

    Morten Ross


    MR
    Wednesday, September 10, 2008 9:55 AM

Answers

  • Hello,

     

    This error message usually indicates that the WMI repository is corrupted, but sometimes may also indicate that some other system files are corrupted.

     

    If you have any previous backup, I would highly suggest that you try restoring to that backup to see if the problem remains.

     

    Or, would you please try the following steps to see if they can be of any help?

     

    1. Disable and stop the WMI service.

         sc config winmgmt start= disabled

         net stop winmgmt

     

    2. Run the following commands.

         Winmgmt /salvagerepository %windir%\System32\wbem      (I noticed that you have run this command, but I would suggest that you try it again)

         Winmgmt /resetrepository %windir%\System32\wbem

     

    4. Re-enable the WMI service and then reboot the server to see how it goes.

         sc config winmgmt start= auto

     

    If the problem remains, then try the following steps to rebuild the repository:

     

    1. Disable and stop the WMI service.

         sc config winmgmt start= disabled     (note that there is a blank between '=' and 'disabled')

         net stop winmgmt

     

    2. Rename the repository folder (located at %windir%\System32\wbem\repository) to repository.old.

     

    3. Re-enable the WMI service.

         sc config winmgmt start= auto

     

    4. Reboot the server to see if the problem remains.

     

    If the above steps cannot help, you may also need to check if some disk sectors or system files are corrupted. You may try "chkdsk" and "sfc /scannow" commands to see if they can help. Otherwise, you may need to reinstall the whole server.

     

    Best regards,

    Chang Yin
    • Marked as answer by Chang Yin Friday, September 19, 2008 9:11 AM
    Friday, September 12, 2008 12:38 PM

All replies

  • Hello,

     

    This error message usually indicates that the WMI repository is corrupted, but sometimes may also indicate that some other system files are corrupted.

     

    If you have any previous backup, I would highly suggest that you try restoring to that backup to see if the problem remains.

     

    Or, would you please try the following steps to see if they can be of any help?

     

    1. Disable and stop the WMI service.

         sc config winmgmt start= disabled

         net stop winmgmt

     

    2. Run the following commands.

         Winmgmt /salvagerepository %windir%\System32\wbem      (I noticed that you have run this command, but I would suggest that you try it again)

         Winmgmt /resetrepository %windir%\System32\wbem

     

    4. Re-enable the WMI service and then reboot the server to see how it goes.

         sc config winmgmt start= auto

     

    If the problem remains, then try the following steps to rebuild the repository:

     

    1. Disable and stop the WMI service.

         sc config winmgmt start= disabled     (note that there is a blank between '=' and 'disabled')

         net stop winmgmt

     

    2. Rename the repository folder (located at %windir%\System32\wbem\repository) to repository.old.

     

    3. Re-enable the WMI service.

         sc config winmgmt start= auto

     

    4. Reboot the server to see if the problem remains.

     

    If the above steps cannot help, you may also need to check if some disk sectors or system files are corrupted. You may try "chkdsk" and "sfc /scannow" commands to see if they can help. Otherwise, you may need to reinstall the whole server.

     

    Best regards,

    Chang Yin
    • Marked as answer by Chang Yin Friday, September 19, 2008 9:11 AM
    Friday, September 12, 2008 12:38 PM
  • We had similar problems and the procedure above worked, however in addition we had to rejoin the computer account to the domain.

     

    Wednesday, June 22, 2011 12:06 PM
  • This worked.. Thanks!

     

    Wednesday, November 09, 2011 12:28 AM
  • Thanks for the great post.

    it worked for me without restart.

    Kind Regards,

    Ali

    Monday, December 10, 2012 7:19 AM
  • This procedure worked for me on an SBS 2011 server which has had SBS console crashing and other applications crashing.

    I've been looking everywhere for a solution to this problem and was going to rebuild the server.

    I know you posted this a very long time ago but thank you Chang Yin you rock !

    Tuesday, January 08, 2013 7:00 AM
  • Thank you so much Chang. It worked like a miracle.
    Friday, May 10, 2013 11:43 AM
  • Thanks for the solution Chang Yin. Still valid after 5 years.

    Thursday, August 29, 2013 7:55 AM
  • Just had this issue and this solution still works like a charm. You are the man Chang
    Tuesday, September 24, 2013 7:23 PM
  • Chang,

    Thanks for helping me out. I have had this problem on our 8 year old DC for the last few months and nothing has worked until I finally saw your post. It took some tweaking but in the end it finally stopped. The WMI CPU was up around 35-55% after just a few mins of stop and restarting the service. My users will be happy, well as happy as users get anyways, with an increase in responsiveness. 

    Just wanted to thank you.

    Brian

    Sunday, November 24, 2013 4:26 AM
  • Awesome Post! It just worked like a charm. Thanks Chang.
    Monday, November 25, 2013 5:55 AM
  • Worked again.  Still Valid and important information.
    Tuesday, June 10, 2014 2:16 PM
  • What is the procedure for Windows 7 pro with SP1?
    Thursday, June 12, 2014 6:17 PM
  • What is the procedure for Windows 7 pro with SP1?
    Well chkdsk fixed the issue. Thanks Chang Yin. 
    Saturday, June 14, 2014 11:59 AM