Wmi Repair Basic Level
When WMI is throwing errors you can get it repaired with the steps mentioned below. sometime WMI issue occur when SP is installed or some major security update open a command prompt with run as administrator privileges and run below commands.
Winmgmt /verifyrepository to do a check of the repository
Winmgmt /salvagerepository to rebuild the repository to the last known working (Most common fix)
Winmgmt /resetrepository to set the repository back to new build status.
Wmi Repair Medium Level
When WMI is throwing errors you can get it repaired with the steps mentioned below. sometime WMI issue occur when SP is instlled or some major security update.
Try to rebuild the repository…..
1. winmgmt /clearadap
2. winmgmt /kill
3. winmgmt /unregserver
4. winmgmt /regserver
5. winmgmt /resyncperf
6. net stop winmgmt
7. del %SystemRoot%\system32\Wbem\Repository\*.* /s
8. net start winmgmt
9. %SystemRoot%\system32\wbem\wbemtest.exe
10. Connect using Root/Default
first time connection will take some time since the repository is being rebuilt.
WMI Repair Advanced Level
When WMI is throwing errors you can get it repaired with the steps mentioned below. sometime WMI issue occur when SP is instlled or some major security update.
While doing WBEMTEST, (Via command prompt, %SystemRoot%\system32\wbem\wbemtest.exe), we get the below Error:-
0x80041002
wmi description: not found
While connecting to local WMI, (Run wmimgmt.msc from command prompt; right-button on “WMI Control (Local)”- properties), we get the below error:-
Failed to initialize all required WMI classes.
Win32_Processor: WMI: Not found
Win32_WMlsetting: WMI: Not found
Security information: Successful
Win32_OperatingSystem: WMI: Not Found
Troubleshooting steps:–
Rename Repository folder to repository_OLD.
ren %windir%\System32\wbem\Repository %windir%\System32\wbem\Repository_old
Create new Repository folder
md %windir%\System32\wbem\repository
sc config winmgmt start= disabled
net stop winmgmt /y
cd %windir%\system32\wbem
for /f %s in (‘dir /b *.dll’) do regsvr32 /s %s –check all the WBEM DLLs are correctly registered
regsvr32 %windir%\system32\tscfgwmi.dll –check that the Terminal Services provider is correctly registered
wmiprvse /regserver –check that the provider host is correctly registered
winmgmt /regserver –check that the WBEM Server (WMI service) is correctly registered
sc config winmgmt start= Auto
net start winmgmt
Recompile the MOF files under the WBEM folder
for /f %s in (‘dir /b *.mof *.mfl’) do mofcomp %s
After reboot you can check doing a WBEMTEST as well as connecting to a local WMI.