--------------------------------------
winmgmt /resetrepository
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
-----------------
Or run below from c:\windows\system32\wbem\
@echo off
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
wmiprvse /regserver
winmgmt /regserver
sc config winmgmt start= auto
net start winmgmt
for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s
b. Reboot the machine and test WMI
For any query or concern write back to use.