Winmgmt /salvagerepository 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:
Winmgmt /resetrepository Note this will reset repository to the initial state when the OS was first installed
For Windows XP and Windows Server 2003, there are no built in switches to rebuild the Repository, so you must do it manually.
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:
Standard:
net stop ccmexec
net stop winmgmt
%SYSTEMDRIVE%
CD %windir%\system32\wbem
rd /S /Q repository
net start winmgmt
net start ccmexec
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
for /f %%s in ('dir /b *.mof') do mofcomp %%s
wmiprvse /regserver
Ausführlich:
sc config winmgmt start= disabled
net stop winmgmt /y
%systemdrive%
cd %windir%\system32\wbem
for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s
for /f %%s in ('dir /b *.exe') do regsvr32 /s %%s
cd %windir%\sysWOW64\wbem
for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s
for /f %%s in ('dir /b *.exe') do regsvr32 /s %%s
cd %windir%\system32\wbem
wmiprvse /regserver
winmgmt /regserver
sc config winmgmt start= auto
net start winmgmt
cd %windir%\system32\wbem
for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s
cd %windir%\sysWOW64\wbem
for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s
pause
<a class="external free" href="http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx#pi136298=1" rel="nofollow">http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx#pi136298=1</a>