There are times when the WMI Repository gets corrupted which results in the Provider Load Failure. To resolve this issue, you need to repair or rebuild the WMI Repository in your Windows 10 computer. In this post, you will be guided on how exactly you can do that.
In case you don’t know, the WMI which stands for Windows Management Instrumentation is a set of specifications from Microsoft to consolidate the management of devices and applications in a network. The WMI is a database that stores meta-information and definitions for WMI classes. Using only these, the conditions of the systems can be known.
You can find the WMI Repository in %windir%System32WbemRepository. It provides end-users with the status of the local or remote computer system. Keep in mind that you must not use this on the Server 2012 Cluster machine.
Although there are command-line tools that can fix or restore the Windows Management Instrumentation repository. However, Microsoft suggests that it’s better if you verify if there is corruption. Here are a list of errors as well as permission issues you might encounter:
- Unable to connect to root default or rootcimv2 namespaces. It fails with the error code “0x80041002” pointing to “WBEM_E_NOT_FOUND.”
- 0x80041010 WBEM_E_INVALID_CLASS
- When you open Computer Management and Right Click on Computer Management (Local) and select Properties, you get the following error: “ WMI: Not Found” or it hangs trying to connect
- Trying to use wbemtest , and it hangs
- Schemas/Objects missing
- Strange connection/operation errors (0x8007054e)
To verify if there is corruption, you can try running the following command in an elevated Command Prompt:
winmgmt /verifyrepository
After you enter the command, if there is a response saying, “repository is not consistent”, then the repository has an issue. If not, then something else is causing the problem. Since you are certain that corruption exists in the WMI repository, then here are some suggestions you need to check out to repair or rebuild the WMI repository.
Option 1 – Try to reset WMI Repository
- Type “command prompt” in the Start Search and right-click on Command Prompt from the search results and then select “Run as administrator”.
- After opening Command Prompt with admin privileges, type and enter this command: winmmgmt /salvagerepository
The command you entered is used when the winmmgmt command performs a consistency check. So if an inconsistency is detected, it will rebuild the repository.
- Next, execute this command to see if the WMI repository now comes back as consistent: winmgmt /verifyrepository
This command will perform a consistency check on the WMI repository.
- If it states that the WMI repository is not consistent, then you need to type and enter this command: winmgmt /resetrepository
This command is used to reset the repository to its initial state when the operating system was first installed.
Option 2 – Try to force recover the WMI Repository
The WMI Repository comes with a built-in self-recovery process so when the WMI service restarts or detects any corruption, it will automatically trigger the self-recovery procedure. This can happen in two ways:
- AutoRestore: This will use the backup images if the Volume Shadow copy or VSS backup is turned on.
- AutoRecovery: The rebuilding process will generate fresh images of the WMI repository based on the registered MOFs. The MOFs are available in the registry located at HKLMSoftwareMicrosoftWBEMCIMOM: Autorecover MOFs
Note: Autorecover MOFs is a key so double click on it to check its value.
On the other hand, if the self-recovery procedure does not work, you can try to use the force-recovery process instead. How? Refer to these steps:
- First, you need to check the reg key value is empty or not under this registry path: HKLMSoftwareMicrosoftWBEMCIMOMAutorecover MOFs
- If the reg key value is empty, you have to copy-paste the reg key value from another computer. Just make sure that it’s from the System which is equivalent to the computer in question.
- Next, type and enter this command: Winmgmt /resetrepository
- After you enter the command, if you get an error that says, “WMI repository reset failed. Error code:0x8007041B. Facility: Win32”, then you have to stop all the Dependency Services on the WMI service by running the following commands:
- net stop winmgmt /y
- Winmgmt /resetrepository
This should fix the problem.