Windows

How to reset or repair WMI repository in Windows 10

Many times the WMI repository gets corrupted, resulting in a �provider load error�. Next in this post we will see how you can repair a corrupt WMI repository in Windows 10.

The WMI (Windows Management Instrumentation) or Instrumental Windows Management is a set of specifications for Microsoft to consolidate management of devices and applications on a network. It is a database that stores meta information and definitions for WMI classes. In short, it provides end users with the status of the local or remote computer system. It is available at: % windir% \ System32 \ Wbem \ Repository.

Repair WMI repository on Windows

There are command line tools to repair or restore the WMI repository. However, Microsoft suggests that it is best to check for damage.

There is a list of errors and permission problems that you might encounter. The best way to verify is to run this command in a Command Prompt window as an administrator.

winmgmt / verifyrepository

If the repository has no problem, it will reply “WMI repository is consistent”. If this is the case, then something else is causing the problem.

Otherwise it will reply ” WMI repository is not consistent “. Then you will be sure that there is a corruption in the repository, so you should follow the recommendations below to repair or rebuild the WMI repository.

1. Reset the WMI repository

Open the Command Prompt with elevated privileges and run the command:

winmmgmt / salvagerepository

Then run the command to see if the output is now consistent:

winmgmt / verifyrepository

If again it tells you that the WMI repository is not consistent, try running:

winmgmt / resetrepository

This will help you fix the WMI repository. The above commands mean the following:

  • salvagerepository: when used together with the winmmgmt command it performs a consistency check. If an inconsistency is found, the repository is rebuilt.
  • verifyrepository – Performs a consistency check on the WMI repository.
  • resetrepository: the repository is reset to the initial state when the operating system was first installed

2. Force WMI repair

The WMI repository comes with a built-in self-recovery process. When the WMI service restarts or detects any corruption, the recovery procedure will be triggered automatically. It happens in two ways:

AutoRestore – Use backup images here if VSS (Volume Shadow Copy) backup is enabled.

AutoRecovery: in this case, the rebuild process will generate new Repository images based on registered MOFs. The MOFs are available from the registry here:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Wbem \ CIMOM: Autorecover MOFs 

NOTE: Self-healing MOF files are a key. Double click on it to check the value.

Automatic WMI recovery did not work

If automatic recovery doesn’t work, you can always use the forced recovery process.

Check if the key value is empty or not here:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Wbem \ CIMOM: Autorecover MOFs 

If this registry key is empty, copy and paste its value from another computer. Just make sure it’s from a system equivalent to the computer in question.

When you do, then run the following command:

winmgmt / resetrepository

If an error appears, �WMI repository restart failed. Error code: 0x8007041B. Installation: Win32 �, then for all Dependency Services in the WMI service with the following commands:

net stop winmgmt / a winmgmt / resetrepository

WMI repair tool

If the two fixes suggested above don’t work, it’s time to try an automated tool. This tool will repair the server’s WMI repository when it gets corrupted or has related problems. You can download the WMI Fixer Tool from  Technet .

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button