The WMI Repository is the data database “%windir%\system32\wbem\repository” That stores meta-information and definitions for WMI Classes. In some cases the repository also stores static class data as well. If the Repository becomes corrupted, then the WMI service will not be able to function correctly. SCCM is build to use the WMI repository to work.
If you suspect that the WMI repository is corrupted the last thing you should do is rebuilding and deleting the repository, †it could damage your windows installation and let fail applications. Other steps need to be taken first to confirm that the repository is truly corrupted. A large repository could cause problems and†sometimes be interpreted as a corrupt repository, which is not always the case. If issues are due to a large repository, rebuilding the repository is currently the only method available to reduce the repository size.
Before you take anysteps make sure you used WMIdiag†to report any problems with the repository.
If repository is found to be inconsistent:
††† a. For Vista and newer, run from elevated command prompt:
Note†this command will take the content of the inconsistent repository and merge it into the rebuilt repository if it is readable
If the above doesnít work, then run:
Note†this will reset repository to the initial state when the OS was first installed.
Note†In Windows XP and Windows Server 2003 there is no posibility to use switches for repairing the†repository.
Warning: Rebuilding the WMI repository has resulted in some 3rd party products not working until their setup is re-run & their MOF re-added back to the repository.
If /salvagerepository or /resetrepository does not resolve the issue, then manually rebuild repository:
- Open a CMD prompt with elevated privileges
- Use “net stop winmgmt” to stop the WMI services
- Rename the repository folder:† C:\WINDOWS\system32\wbem\Repository to Repository.old
- CD windows\system32\wbem
- for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
- Use “net start winmgmt” to start the WMI services
- cd /d c:\† ((go to the root of the c drive, this is important))
- for /f %s in (‘dir /s /b *.mof *.mfl’) do mofcomp %s
- Reboot the server or client