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:

First try:
  1. winmgmt /verifyrepository .If the result is shown as inconsistent, go to step 2
  2. winmgmt /salvagerepository
  3. winmgmt /verifyrepository - to check again wmi repository had been repaired successfully. If it fails - try fully rebuild the WMI Repository follow these steps:
  4. Disable and stop the winmgmt service
  5. Remove or rename C:\Windows\System32\wbem\repository
  6. Enable and start the winmgmt service
  7. Open a CMD prompt as Administrator
  8. In the CMD prompt Navigate to C:\Windows\System32\wbem\
  9. Run the following command:
    for /f %s in ('dir /b *.mof') do mofcomp %s
    Note: This will take a minute or so to complete.
  10. Now run the command:
    for /f %s in ('dir /b en-us\*.mfl') do mofcomp en-us\%s
  11. 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

Popular posts from this blog

vRA/vRO workflows

How to generate HPS Report for Windows