Today I had a problem on a server running Windows Server 2008, the WMI repository on the server got inconsistent and I had to rebuild it
As it is written on wikipedia:
http://en.wikipedia.org/wiki/Windows_Management_Instrumentation - "Windows Management Instrumentation (WMI) is a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components provide information and notification".
The location of the WMI Repository is "%windir%System32\Wbem\Repository" , you can check here the size and when the WMI Respository was created/modified:
Take good precaution when you are manipulating the WMI Repository because it can harm your system or the applications that are installed. Before you start working with it do a little diagnosis by running the application
WMI Diagnosis Utility, you can download it from Microsoft's website : http://www.microsoft.com/en-us/download/confirmation.aspx?id=7684. Check also event viewer for some WMI errors. After you know that there is a problem with the wmi repository try the following:
Open cmd with administrator credentials
Add the following in a .bat file (only the Bold lines):
for /f %%s in ('dir /b *.dll') do regsvr32 /s %
sc config winmgmt start= auto
net start winmgmt
for /f %s in ('dir /s /b *.mof *.mfl') do mofcomp %s
If this solution doesn't resolve the issue then try the following:
This command will check the repository status. If the status is inconsistent then type the following
This command will try to salvage the repository by merging the content of the repository into a rebuild repository if it's possible
If the status is consistent then your job is done if the status is still inconsistent
This command will reset the repository and will reset it to defaults
This steps should fix the problem, I hope this post will help if you encounter the same problem.
For now have a nice day.