Solutions for WMI errors
Solutions for WMI errors
Symptoms:
When you run wmic commands in a Windows server, you may get errors like below:
wmic VOLUME GET Name
ERROR: Description = Not Found
Below are solutions for WMI errors, yet to be verified:
If WMI database is broken, you need to follow this guide:
https://msdn.microsoft.com/en-us/library/aa394603(v=vs.85).aspx
to run WMI Diagnosis Utility, which will help you to confirm if that is really your issue and then fix it by following this guide:
to run WMI Diagnosis Utility, which will help you to confirm if that is really your issue and then fix it by following this guide:
First try:
- winmgmt /verifyrepository .If the result is shown as inconsistent, go to step 2
- winmgmt /salvagerepository
- winmgmt /verifyrepository - to check again wmi repository had been repaired successfully. If it fails - try fully rebuild the WMI Repository follow these steps:
- Disable and stop the winmgmt service
- Remove or rename C:\Windows\System32\wbem\repository
- Enable and start the winmgmt service
- Open a CMD prompt as Administrator
- In the CMD prompt Navigate to C:\Windows\System32\wbem\
- Run the following command:
for /f %s in ('dir /b *.mof') do mofcomp %s
Note: This will take a minute or so to complete. - Now run the command:
for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s - Reboot the server
Ref: https://serverfault.com/questions/795583/wmic-os-alias-not-found
https://social.technet.microsoft.com/Forums/windows/en-US/8ed26d46-9994-4052-a307-5b071805aea8/wmi-corrupt-how-to-reinstallrepair?forum=winservergen
Comments
Post a Comment