Are you facing challenges running the WMIC command in windows e.g. wmic bios get serialnumber and facing errors like Error: Description = Not Found or WMIC Corrupt
Follow the following steps to resolve this challenge:
Solution 1:
- Disable and stop the WMI service:
- sc config winmgmt start= disabled
- net stop winmgmt
- Run the following commands:
- Winmgmt /salvagerepository C:\WINDOWS\System32\wbem
- Winmgmt /resetrepository C:\WINDOWS\System32\wbem
- Re-enable the WMI service and then reboot the computer to see how it goes.
Solution 2
If the problem remains, then try the following steps to rebuild the repository
- Disable and stop the WMI service.
- sc config winmgmt start= disabled (note that there is a blank between ‘=’ and ‘disabled’)
- net stop winmgmt
- Rename the repository folder (located at C:\WINDOWS\System32\wbem\repository) to repository.old.
- Re-enable the WMI service.
- sc config winmgmt start= auto
- Reboot the computer to see if the problem remains.
If the above steps dont work, you may also need to check if some disk sectors or system files are corrupted. You may try “chkdsk” and “sfc /scannow” commands to see if they can help. Otherwise, you may need to reinstall the operating system.