
[Solution] Fix WMI Repository
- ] Reset WMI Repository. Open Command Prompt with elevated privileges. It will help you fix the WMI repository. ...
- ] Force Recover WMI. WMI comes with an inbuilt self-recovery process. ...
- ] WMI Fixer Tool. This tool will fix Server’s WMI Repository when they’re corrupted or experiencing related issued. ...
- Disable and stop the WMI service. ...
- Rename the repository folder (located at C:\WINDOWS\System32\wbem\repository) to repository. ...
- Re-enable the WMI service. ...
- Reboot the server to see if the problem remains.
How to fix WMI issues automatically?
- Unable to connect to root\default or root\cimv2 namespaces thru wbemtest. ...
- When we 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 connect
- 0x80041010 WBEM_E_INVALID_CLASS
- Trying to use wbemtest, it hangs
How can I reboot a computer with a WMI call?
To create a reboot script for use with PRTG, follow these simple steps:
- Ensure that the folder C:\temp exists. The log file will be created there. ...
- Ensure that WMI is running. ...
- Create a text file and paste the following VBS script ( see other posts below for a modified script which allows for rebooting multiple servers and adding delays ):
How to rebuild WMI?
- Disable and stop the winmgmt service
- Remove or rename C:\Windows\System32\wbem\repository
- Enable and start the winmgmt service
- Open Command Prompt as Administrator
- Run the following commands: cd C:\Windows\System32\wbem\ for /f %s in ('dir /b *.mof') do mofcomp %s NOTE: This will take a minute or so to complete. ...
How to troubleshoot, repair and rebuild the WMI repository?
- Stop the WMI Service, you may need to stop services dependent on the WMI service first before it allow you to successfully stop WMI Service
- Rename the repository folder: C:WINDOWSsystem32wbemRepository to Repository.old
- Open a CMD Prompt with elevated privileges
- Cd windowssystem32wbem
What is WMI in Microsoft?
What is the error code for WMI repository reset failed?
What to do if self recovery doesn't work?
What to do if both suggested fixes don't work?
Can you restore WMI?
See more
About this website

Why does WMI get corrupted?
If you're getting that error this means that part of the operating system is broken. This is usually caused by partial (and failed) driver installation and/or “cleaner utilities”.
How do I know if my WMI is corrupted?
Confirm WMI is brokenLaunch the WMI MMC snapin: go to Start -> Run -> type wmimgmt.msc.Right click WMI Control (Local) and click Properties. ... If WMI is working correctly, you will see Successfully connected window as shown below.If you see Invalid class or any other error message then WMI is not working properly.
How do I reset WMI service?
Type net stop winmgmt into the command prompt and press enter. When prompted if you wish to continue, type Y and press enter. Type winmgmt /resetrepository into the command prompt and press enter. Restart your computer to pick up the changes.
How do I check my WMI health?
The following steps may be used to check the health of WMI:Select Start > Run.In the field type wbemtest.exe.Select OK.Select Connect.A new Connect dialog will appear.In the first text box at the top, "root\default" should appear.If the text box is empty, type root\default.Select Connect.More items...
What is a WMI error?
The WMI error code 0x800706ba is a common error on Microsoft Windows XP. The error code is generated when the computer makes a request to a remote Microsoft COM+ object, but the request fails. The error code may be accompanied by the error message “RPC server is unavailable.”
What does WMI stand for?
Windows Management InstrumentationWindows Management Instrumentation (WMI) is a set of specifications from Microsoft for consolidating the management of devices and applications in a network from Windows computing systems. WMI provides users with information about the status of local or remote computer systems.
How do I rebuild my WMI provider?
How to: Rebuilding the WMI RepositoryDisable and stop the WMI service. a. sc config winmgmt start= disabled b. net stop winmgmt.Run the following commands. a. Winmgmt /salvagerepository %windir%\System32\wbem b. ... Re-enable the WMI service and then reboot the server to see how it goes. a. sc config winmgmt start= auto.
How do I run a WMI service?
To start Winmgmt Service At a command prompt, enter net start winmgmt [/
How do I enable WMI?
To enable or disable WMI traffic using firewall UI In the Control Panel, click Security and then click Windows Firewall. Click Change Settings and then click the Exceptions tab. In the Exceptions window, select the check box for Windows Management Instrumentation (WMI) to enable WMI traffic through the firewall.
How do I open WMI tester?
This tool is installed by Windows. To run it, launch a command console by typing cmd.exe in the Start/Run dialog box and click OK. Then, type wbemtest.exe in the command window. The Windows Management Instrumentation Tester tool is then launched.
How do I fix Windows Management Instrumentation service failed?
To resolve this error and recreate any missing or corrupt registry entries, perform the following steps:Start a command-line session.Unregister any WMI service (also known as WinMgmt) performance libraries by typing winmgmt /clearadap.Stop all running copies of the WMI service by typing winmgmt /kill.More items...
What is the effect if a file in main repository becomes corrupted?
If Repository becomes corrupted, then the WMI service will not be able to function correctly.
Where is the WMI repository located?
%WINDIR%\System32\wbem\RepositoryThe WMI repository is located at %WINDIR%\System32\wbem\Repository and the sum of all the files in that folder constitute the repository size.
What does Mofcomp EXE do?
By default, Mofcomp.exe stores the compiled classes in the root\default WMI namespace.
WMI repair for SCCM client reintall
Some of the clients reporting client NA have WMI issues. If i repair WMI and reinstall SCCM clients they work. My query is i need to do this on multiple machines. I am able to do this remotely by copying the rebuild script on the machine and executing it via psexec. Can i do WMI rebuild ... · it the script truly a repair aka non destructive ...
WMI: Rebuilding the WMI Repository - Microsoft Tech Community
Finally, install latest hotfixes for WMI as they can help prevent issue from recurring. If you continue to have recurring WMI repository corruption issues on same machine, please engage a Microsoft Support Engineer for further troubleshooting and assistance.
Fixing and repairing WMI - Michls Tech Blog
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website.
WMI: Repository Corruption, or Not? - Microsoft Tech Community
First published on TECHNET on Aug 08, 2014 Scenario Windows Management Instrumentation failing due to repository being corrupted The WMI Repository
What is WMI in Microsoft?
For those who aren’t aware, Windows Management Instrumentation or WMI is a set of specifications from Microsoft to consolidate the management of devices and applications in a network. It is a database that stores meta-information and definitions for WMI classes.
What is the error code for WMI repository reset failed?
If you get an error “WMI repository reset failed. Error code:0x8007041B. Facility: Win32”, then stop all Dependency Services on the WMI service by running the following commands:
What to do if self recovery doesn't work?
If the self-recovery doesn’t work, you can always use the force-recovery process. If the above regkey is empty, copy-paste the regkey value from another machine. Make sure it’s from System which is equivalent to the computer in question. If you get an error “WMI repository reset failed.
What to do if both suggested fixes don't work?
If both of the suggested fixes don’t work, its time you try an automated tool.
Can you restore WMI?
There are command line tools to fix or restore the WMI repository. However, Microsoft suggests that its best that you verify if there is corruption.
What to do if Winmgmt doesn't restore WMI?
If both commands ( Winmgmt /salvagerepository and Winmgmt /resetrepository) didn’t restore the consistent state of the WMI database, try to perform a hard reset of the WMI database with the following script:
What happens when a WMI repository is damaged?
In some cases the WMI repository can also contain static class information. When the repository is damaged, errors occur in the activity of WMI service (Winmgmt). If you suspect that the WMI repository is damaged, keep in mind that it only should be recreated if no other means to restore WMI are effective.
How to test WMI health?
If the Winmgmt service is running, you can test the health of WMI by quering it with a simple WMI command. You can execute wmi request from command prompt or from PowerShell. For example, the following command will list the programs installed on Windows:
What is WMIdiag?
WMIdiag is a vbs script that checks various WMI subsystems and writes the collected information to the log files (by default the logs are located in %TEMP% folder – C:USERS%USERNAME%APPDATALOCALTEMP ). The resulting report consists of files with names starting with WMIDIAG-V2.2 and includes the following file types:
What is WMIDiag in Windows?
WMIDiag provide detailed information on how to correct local errors in WMI, but in most cases it is a time-consuming task and is worth of the time spent only when looking for solutions to the problems in the critical systems (usually on the production servers). In case of the user workstations, it is much easier to reset and rebuild the WMI repository in Windows.
Where is the WMI repository located?
The WMI repository is located in %windir%System32WbemRepository and is a database that contains information on the metadata and definitions of the WMI classes. In some cases the WMI repository can also contain static class information. When the repository is damaged, errors occur in the activity of WMI service (Winmgmt).
Does WMIDiag 2.2 work on Windows Server 2012 R2?
Unfortunately, the latest version of WMIDiag 2.2 works correctly only with versions up to Windows 8.1/Windows Server 2012 R2. At this point, Microsoft has even removed the link to download WMIDiag from the Download Center. But if you wish, this script can be found on the web.
Why can't I delete WMI?
Under any circumstances, do not delete the WMI repository as a first action because deleting the repository can cause damage to the system or to installed applications.
Where to find WMI error messages?
When you get an error message from WMI, you can locate the message in WMI Error Constants or, for scripting, WbemErrorEnum. However, the information supplied by the error alone is typically insufficient to determine what is happening. WMI repository corruption may masquerade as classes or instances "not found".
What are access denied errors?
Access Denied errors that are reported by scripts and applications that access WMI namespaces and data generally fall into three categories. The following table lists the three categories of errors along with issues that might cause the errors and possible solutions.
What is WMI log?
The WMI logs track events from within the WMI core and from providers. For more information, see Logging WMI Activity.
How to get more information about the source of a problem?
To obtain more information about the source of the problem, you can download and run the WMI Diagnosis Utility diagnostic command line tool. This tool produces a report that can usually isolate the source of the problem and provide instructions on how to fix it. The report also aids Microsoft support services in assisting you. You can download the WMI Diagnosis Utility at the Download Center.
What is a DCOM error?
Typically, DCOM errors occur when connecting to a remote computer with a different operating system version.
Is WMI diagnostic utility supported?
The WMI diagnosis Utility (WMIDiag.exe) is no longer supported starting with Windows 8 and Windows Server 2012.
What happens if WMI is corrupted?
If WMI is corrupted, you can receive various errors depending on what activity was being accomplished at the time.
Why install latest hotfixes for WMI?
Finally, install latest hotfixes for WMI as they can help prevent issue from recurring. If you continue to have recurring WMI repository corruption issues on same machine, please engage a Microsoft Support Engineer for further troubleshooting and assistance.
What is a WMI repository?
The WMI Repository "%windir%System32WbemRepository" is the database that stores meta-information and definitions for WMI classes; in some cases the repository also stores static class data as well. If the Repository becomes corrupted, then the WMI service will not be able to function correctly.
Does Windows 2003 have a rebuild switch?
For Windows XP and Windows Server 2003, there are no built in switches to rebuild the Repository, so you must do it manually.
Can deleting a repository cause damage?
Deleting and rebuilding the repository can cause damage to the system or to installed applications. Other steps should be taken first to eliminate other possibilities or to confirm we have repository corruption.
What is WMI in Microsoft?
For those who aren’t aware, Windows Management Instrumentation or WMI is a set of specifications from Microsoft to consolidate the management of devices and applications in a network. It is a database that stores meta-information and definitions for WMI classes.
What is the error code for WMI repository reset failed?
If you get an error “WMI repository reset failed. Error code:0x8007041B. Facility: Win32”, then stop all Dependency Services on the WMI service by running the following commands:
What to do if self recovery doesn't work?
If the self-recovery doesn’t work, you can always use the force-recovery process. If the above regkey is empty, copy-paste the regkey value from another machine. Make sure it’s from System which is equivalent to the computer in question. If you get an error “WMI repository reset failed.
What to do if both suggested fixes don't work?
If both of the suggested fixes don’t work, its time you try an automated tool.
Can you restore WMI?
There are command line tools to fix or restore the WMI repository. However, Microsoft suggests that its best that you verify if there is corruption.

WMI Diagnosis Utility
- First of all, locate the event log by launching the Control Panel. Select System and Security, then navigate to Administrative Tools. Once the administrative window appears, you will see something similar as in the image below. Double-click on the Event Vieweritem. In the event log's left pane, select Windows Logs -> System. Right-click and select ...
Logging and Tracing
Troubleshooting in Scripts and Applications
How Provider Writers Can Prevent WMI Problems
Access Denied
- The WMI log files no longer exist; they were replaced by Event Tracing for Windows (ETW). For more information, see Tracing WMI Activity, Logging WMI Activity, and WMI Log Files.
Information on Errors
- WMI contains a set of classes for troubleshooting client applications that use WMI providers. For more information, see Troubleshooting WMI Client Applications.
Related Topics
- Provider writers can prevent many problems, which appear in error messages through WMI, by performing the following actions: 1. Registering your provider correctly. For more information, see Registering a Provider. 2. Adding the #pragma autorecoverstatement to the Managed Object Format (MOF) file that defines your provider classes. For more informa...