Repair (Rebuild) the WMI Repository on Windows 11/10
The Windows Management Instrumentation (WMI) Repository is an important part of Windows. It stores management information that Windows and many applications use to communicate with hardware, software, services, and system components.
When the WMI Repository becomes corrupted, inconsistent, or damaged, you may notice unusual problems. Applications may fail to retrieve system information, monitoring tools may stop working, scripts may return WMI errors, or Windows features that depend on WMI may behave unexpectedly.
Fortunately, Windows provides several commands that can help you check the WMI Repository and repair or rebuild it. However, rebuilding the repository should not be the first thing you try. It is safer to check its status first and repair the underlying Windows components when possible.
This guide explains how to check and repair the WMI Repository in Windows 11 and Windows 10 step by step.
Repair (Rebuild) the WMI Repository on Windows 11/10

To repair or rebuild the WMI Repository in Windows 11/10, first check the repository with an elevated Command Prompt using winmgmt /verifyrepository. If Windows reports that the repository is inconsistent, run winmgmt /salvagerepository. If that does not resolve the problem, stop the Windows Management Instrumentation service, rename the Repository folder, restart the service, and allow Windows to recreate the repository.
Before rebuilding anything, it is important to understand that the WMI Repository should not normally be deleted manually.
Start with the least invasive repair method and move to the rebuild procedure only when necessary.
Step 1: Open Command Prompt as an Administrator
The first step is to open Command Prompt with administrator privileges. Some WMI repair commands cannot run correctly from a normal Command Prompt.
Press the Windows key on your keyboard and type Command Prompt. When Command Prompt appears in the search results, right-click it and select Run as administrator.
Windows may display a User Account Control window asking whether you want to allow the application to make changes to your device. Select Yes.
You should now see a black Command Prompt window. The title bar may say Administrator: Command Prompt, which confirms that you have opened it with the required permissions.
Do not close this window because you will use it for the following steps.
Step 2: Check the WMI Repository
Before attempting to repair the repository, check whether Windows considers it consistent.
In the Administrator Command Prompt, type the following command:
winmgmt /verifyrepository
Press Enter and wait for Windows to complete the check.
If Windows reports the WMI repository is consistent, the repository itself is not currently reporting an inconsistency. In that situation, rebuilding it is generally unnecessary, and your original problem may have another cause.
If Windows reports the WMI repository is inconsistent, continue to the next step.
This check is important because it prevents you from rebuilding the repository unnecessarily.
Step 3: Salvage the WMI Repository
If the verification command reports that the repository is inconsistent, Windows provides a repair option called salvage repository.
In the same Administrator Command Prompt, type:
winmgmt /salvagerepository
Then press Enter.
Windows will attempt to repair the existing repository while preserving as much of its information as possible.
When the command finishes, run the verification command again:
winmgmt /verifyrepository
If Windows now reports the WMI repository is consistent, restart your computer and check whether the original WMI-related problem has been resolved.
If the repository is still inconsistent, continue with the next repair method.
Step 4: Try Resetting the WMI Repository
If salvaging the repository did not resolve the inconsistency, you can try the WMI reset operation.
In the Administrator Command Prompt, enter:
winmgmt /resetrepository
Press Enter and allow the command to finish.
This operation attempts to reset the WMI Repository to its initial state.
Afterward, check the repository again by running:
winmgmt /verifyrepository
If Windows reports that the repository is consistent, restart your computer and test the application or Windows feature that originally produced the WMI error.
If the repository remains problematic, continue to the more advanced rebuild procedure below.
Step 5: Stop the Windows Management Instrumentation Service
The next method involves rebuilding the WMI Repository. Before doing this, you must stop the Windows Management Instrumentation service.
Press Windows + R to open the Run dialog box.
Type:
services.msc
Press Enter.
The Services window will open. This window contains many Windows services, so take your time.
Scroll through the list until you find Windows Management Instrumentation.
Right-click Windows Management Instrumentation and select Stop.
Windows may display a message explaining that stopping this service can also stop related services. If Windows asks whether you want to continue, confirm the action.
Wait until the service shows that it has stopped.
Step 6: Open the WMI Repository Folder
Now you need to locate the folder containing the WMI Repository.
Open File Explorer by pressing Windows + E.
Click the address bar at the top of File Explorer and enter:
C:\Windows\System32\wbem
Press Enter.
You will see many files and folders inside the wbem folder.
Look for a folder named:
Repository
This is the folder containing the WMI Repository data.
Do not immediately delete the folder. Renaming it is safer because it gives you an opportunity to restore it if necessary.
Step 7: Rename the Repository Folder
Right-click the Repository folder and select Rename.
Change its name to something such as:
Repository.old
Press Enter to confirm the new name.
If Windows says that the folder is being used or cannot be renamed, return to the Services window and make sure Windows Management Instrumentation is stopped.
You may also need to stop services that depend on WMI before Windows allows the folder to be renamed.
Do not delete Repository.old at this point. Keeping the old folder temporarily gives you a fallback option.
Step 8: Restart Windows Management Instrumentation
Return to the Services window.
Find Windows Management Instrumentation again.
Right-click it and select Start.
Windows will start the WMI service. When Windows detects that the original Repository folder is no longer present under its expected name, it can recreate the necessary repository structure.
This process may take a little time. Avoid repeatedly stopping and starting the service while Windows is rebuilding the required information.
Step 9: Restart Your Computer
After starting the WMI service, restart Windows.
Click Start, select the Power button, and choose Restart.
A restart is useful because it allows Windows and other dependent services to start again with the newly created WMI repository.
Once you reach the Windows desktop, test the application, monitoring utility, script, or feature that was producing the WMI-related error.
Step 10: Verify the Rebuilt Repository
After restarting Windows, open Command Prompt as administrator again.
Run:
winmgmt /verifyrepository
Press Enter.
If Windows reports WMI repository is consistent, the repository has passed the consistency check.
You can also check whether WMI is functioning by running:
winmgmt /salvagerepository
However, there is normally no reason to run repair commands repeatedly if the repository is already reported as consistent.
At this point, use the affected application or Windows feature normally and check whether the original problem has disappeared.
Repair Windows System Files if WMI Problems Continue
If WMI continues to malfunction even after rebuilding the repository, the problem may not actually be the repository itself. Damaged Windows system files can also cause WMI-related problems.
Open Command Prompt as administrator and run:
sfc /scannow
Press Enter and wait for the scan to finish. Do not close the Command Prompt while the scan is running.
If Windows reports that it found and repaired corrupted files, restart the computer and test WMI again.
If the problem continues, you can also use the Deployment Image Servicing and Management (DISM) tool:
DISM /Online /Cleanup-Image /RestoreHealth
Press Enter and allow the process to complete.
After DISM finishes, restart Windows. Running SFC again afterward can also help Windows replace damaged system files.
FAQs
What is the WMI Repository in Windows?
The WMI Repository is a database-like storage area used by Windows Management Instrumentation. It contains management information that Windows, applications, scripts, and administrative tools can use to obtain information about the operating system, hardware, services, and other components.
How do I know if my WMI Repository is corrupted?
The simplest initial check is to open Command Prompt as administrator and run winmgmt /verifyrepository. If Windows reports that the WMI repository is inconsistent, there is a repository consistency problem that may require repair.
Is it safe to rebuild the WMI Repository?
Rebuilding the WMI Repository can be appropriate when the repository is genuinely corrupted, but it should not be treated as a routine troubleshooting step. Start with verification and salvage before moving to a complete rebuild.
Should I delete the WMI Repository folder?
You should generally avoid immediately deleting the Repository folder. Renaming it to something such as Repository.old is a safer approach because you retain the original data temporarily while Windows creates a replacement repository.
Does rebuilding WMI delete my personal files?
Rebuilding the WMI Repository does not normally delete personal documents, photos, videos, or other ordinary user files. However, because WMI contains information used by applications and system-management components, some WMI-related registrations may need to be recreated.
What if the WMI repository is already consistent?
If winmgmt /verifyrepository reports that the repository is consistent, rebuilding it is usually not the appropriate next step. Investigate the specific application, service, system file, driver, or Windows component producing the original error.
Can SFC and DISM fix WMI problems?
SFC and DISM can repair damaged Windows system components that may contribute to WMI problems. They do not function as direct replacements for the WMI Repository repair commands, so they are best considered additional troubleshooting steps.
Summary
The WMI Repository plays an important role in Windows system management, and corruption can cause applications, scripts, monitoring tools, and administrative features to malfunction.
The safest approach is to begin with winmgmt /verifyrepository. If Windows reports an inconsistency, try winmgmt /salvagerepository first. If necessary, you can try winmgmt /resetrepository and then move to the more advanced process of stopping the WMI service, renaming the Repository folder, restarting the service, and rebooting Windows.
If WMI problems continue after the repository has been rebuilt, investigate broader Windows corruption with SFC and DISM rather than repeatedly rebuilding the repository.
