How to rebuild the WMI database

Article:HOWTO7811  |  Created: 2005-11-09  |  Updated: 2012-01-24  |  Article URL
Article Type
How To

How do I rebuild the WMI database?

Quick WMI Rebuild

Open a command shell and enter the following commands:

cd \winnt\system32\wbem or cd \windows\system32\wbem
for %i in (*.mof,*.mfl) do mofcomp.exe %i

In the same directory, it is sometimes neccesary to also re-register the related dlls.


for %i in (*.dll) do regsvr32 /r %i


Finally, restart the wingmt service


net stop "winmgmt"
net start "winmgmt"



Note:  Another suggested step includes deleting the "Repository" folder under the wbem directory, prior to initiating the mofcomp step.  This has not been neccessary in previous fixes.

Legacy ID


Article URL

Terms of use for this information are found in Legal Notices