locked
WMI corrupt - how to reinstall/repair? RRS feed

  • 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 9, 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 8, 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
  • Did this on windows 2012 r2 server and fixed issue. Thanks buddy. great fix
    Friday, September 26, 2014 10:36 AM
  • That worked!

    Happy Holidays and THANK YOU!

    Pat

    Tuesday, December 2, 2014 7:55 PM
  • hi Chang

    Mine is same OS platform Windows Server 2008 R2. Its under domain group with hardening. But the error was different.,

    Out of disk space [0x8004103b].

    - Initially I tried with stopping and restarting the wmi serveices, but no luck.

    - then Winmgmt /salvagerepository & winmgmt /verifyrepository, this time it was access denied error.

    - lastly I took reboot of this server. Guess

    - It fixed the issue.

    Can you provide your inputs for my below query please .. 

    Why most of the windows OS issues will get fixed by simply just reboot. Its good, but want to know what exactly the actions taken place during the booting process.

    Thanks

    praveen




    praveen bellary.

    Saturday, May 30, 2015 1:21 PM
  • I have a Windows Server 2008 Standard 32 bit operating system that is running Terminal Services.  I tried all of the above without any success.  I finally found that permissions in the registry were corrupt.  I followed instructions from this link. https://katyscode.wordpress.com/2007/02/03/tutorial-how-to-fix-wmi-corruption to use subinacl to correct the permissions issue.  After I did that, I rebuilt my repository and finally found joy.
    Tuesday, December 29, 2015 7:37 PM
  • This just made my day! 

    There was an issue with the server manager regarding INVALID NAMESPACE.

    After the command /resetrepository it came back online.

    Many many many thanks!

    For people that are having DFSR EventID 6102 - error's. This also solved it for me.

    • Edited by Tim_86 Wednesday, January 25, 2017 7:32 AM
    Wednesday, January 25, 2017 7:19 AM
  • If the above steps cannot help, you may also need to check if some disk sectors or system files are corrupted. 

    Thanks

    We have had a similar issue with WMI provider failures on virtualized 2012 servers

    Turned to be nasty disk issue with what the system saw as removable disks and an AD GPO effectively denied access to these (should have affected removable USB drives only)

    As a result all shares were not accessible and services could not access all local drives other than the system drive

    SAN disks on the host OS / virtualizatrion configuration was set to be fixed disks and we were up and running again

    An old post but worth a comment if it can help others to find the issue faster than we did 

    rgds

    Friday, April 21, 2017 6:28 PM
  • Thanks Chang,

    Works fine for me!!!

    Cordially,

    Hervé Ndoguéfouba.

    Friday, April 12, 2019 8:46 AM
  • Added this to my toolbox as it quickly resolved my issue.
    Windows Server 2016 Standard

    Thank you.


    • Edited by mhickma Friday, December 27, 2019 5:24 PM
    Friday, December 27, 2019 5:22 PM