Are you experiencing Windows errors, unexpected crashes, corrupted system files, or problems installing updates? If so, your Windows installation might have a component store corruption issue. Fortunately, Windows includes a powerful command-line utility that can help repair these problems.
One command worth knowing is DISM /Online /Cleanup-Image /RestoreHealth.
DISM stands for Deployment Image Servicing and Management. It is a Windows command-line tool designed to service and repair Windows images. You can use it to check for component store corruption and repair damaged Windows components that may affect system stability.
In this guide, we’ll explain what the command does, how to run it correctly, how long it takes, and what to do if it fails.
DISM /Online /Cleanup-Image /RestoreHealth [Complete Guide]

What Is DISM /Online /Cleanup-Image /RestoreHealth?
Before running the command, let’s understand what each part means.
DISM stands for Deployment Image Servicing and Management. It is a Microsoft command-line utility used to manage and repair Windows images.
The complete command is:
DISM /Online /Cleanup-Image /RestoreHealth
Each parameter has a specific purpose.
DISM launches the Deployment Image Servicing and Management utility.
/Online tells DISM to work with the Windows installation currently running on your computer. It does not mean that the command repairs Windows over the internet.
/Cleanup-Image tells the utility to perform maintenance and servicing operations on the Windows component store.
/RestoreHealth instructs DISM to scan the component store for corruption and attempt to repair any problems it detects.
In simple terms, this command checks whether important Windows components are damaged and attempts to restore them to a healthy state.
Why Should You Run the DISM RestoreHealth Command?
Windows depends on several important system components to operate correctly. If these components become corrupted, you may experience unexpected problems.
For example, Windows Update might repeatedly fail, certain applications may stop working, or system utilities may report errors.
This is where DISM RestoreHealth becomes useful.
It can help repair the Windows component store, which contains the files and resources Windows uses for servicing and system maintenance.
Another important reason to use DISM is that it can prepare your system for the System File Checker (SFC) utility. SFC checks protected Windows system files and attempts to replace damaged files using healthy copies.
Running DISM before SFC is generally a recommended troubleshooting sequence when Windows system-file corruption is suspected.
Step 1: Open Command Prompt as Administrator
The first thing you need to do is open an elevated Command Prompt.
Click the Start menu and type cmd in the search box.
When Command Prompt appears, right-click it and select Run as administrator.
Windows may display a User Account Control confirmation asking whether you want to allow the application to make changes to your device.
Select Yes.
You should now see an Administrator Command Prompt window.
Administrative permissions are important because DISM needs sufficient access to inspect and service Windows components.
Step 2: Run the DISM RestoreHealth Command
Now that Command Prompt is open, enter the following command:
DISM /Online /Cleanup-Image /RestoreHealth
Press Enter to start the operation.
DISM will begin checking the Windows component store for corruption. If it detects repairable problems, it will attempt to restore the affected components.
During the process, you may see a progress percentage displayed in the Command Prompt window.
Let the operation finish without closing the window or restarting your computer.
Step 3: Wait for the Repair Process to Finish
One common question is how long the DISM RestoreHealth command takes.
There isn’t one fixed answer. The process may finish in around 10 to 30 minutes on some systems, while others may take considerably longer.
Your computer’s hardware, Windows installation condition, available repair sources, and internet connection can all affect the time required.
Sometimes the progress percentage appears stuck at a particular number, such as 20%, 40%, or 62.3%.
Don’t immediately assume that DISM has stopped working.
DISM can spend considerable time processing certain repair operations without showing noticeable progress. Give it enough time to finish before deciding that something is wrong.
Step 4: Understand the DISM Results
After the process finishes, DISM displays a message indicating whether the operation succeeded.
The ideal result is:
The restore operation completed successfully.
This means DISM completed the requested repair operation without reporting a failure.
You may also see a message stating that the component store corruption was repaired.
However, successful DISM execution does not automatically mean every Windows problem has been fixed.
If you’re troubleshooting corrupted system files, continue with the SFC scan.
Step 5: Run System File Checker
Once DISM finishes successfully, run the System File Checker command.
Enter:
SFC /scannow
Press Enter.
SFC will scan protected Windows system files and attempt to repair corrupted or missing files using healthy copies.
Wait until the scan reaches 100%.
You may receive different results depending on what SFC finds.
If Windows Resource Protection did not find any integrity violations, your protected system files passed the scan.
If it found corrupted files and successfully repaired them, restart your computer and check whether the original problem has disappeared.
If it found corrupted files but couldn’t repair some of them, additional troubleshooting may be necessary.
Important: DISM and SFC perform different jobs. DISM repairs the component store, while SFC checks protected system files. Using them together provides a more complete approach to troubleshooting Windows corruption.
Step 6: Restart Your Computer
After both commands finish, save your work and restart your PC.
A restart allows Windows to complete pending servicing operations and reload repaired system components.
Once your computer starts again, check whether the original issue still occurs.
For example, if Windows Update was failing, try checking for updates again. If an application was crashing because of system-file problems, open it and see whether the behavior has improved.
Step 7: Check the DISM Log If Something Goes Wrong
If DISM fails, checking its log can help you understand what happened.
DISM creates a log file at:
C:\Windows\Logs\DISM\dism.log
You can open this file using Notepad.
Look near the end of the log for recent error messages and relevant error codes.
You can also check the Windows servicing log if the problem appears related to component servicing.
The log may contain technical information, but it can help identify whether the problem involves missing repair files, inaccessible sources, or component store corruption.
What If DISM /Online /Cleanup-Image /RestoreHealth Gets Stuck?
Sometimes DISM appears to stop progressing.
Before taking further action, give it additional time. Check whether your computer is still active and whether disk activity is occurring.
If there is no progress for an extended period and the process appears unresponsive, investigate the DISM log for errors.
You should also check that Windows has enough free disk space and that your internet connection is working if DISM needs to download repair files.
Avoid repeatedly terminating the process because doing so can interrupt servicing operations.
How to Fix DISM Error 0x800f081f
One of the more common DISM errors is 0x800f081f.
This error generally means Windows couldn’t find the source files needed to complete the repair.
You can try supplying a compatible Windows installation image as the repair source.
First, obtain Windows installation media that matches your installed Windows version, edition, language, and architecture.
Mount the ISO file by double-clicking it in File Explorer. Note the drive letter assigned to the mounted image.
Check whether the image contains an install.wim or install.esd file inside its Sources folder.
If the image contains install.wim, you can identify the appropriate edition index with:
DISM /Get-WimInfo /WimFile:X:\Sources\install.wim
Replace X with your mounted drive letter.
Once you know the correct index, run:
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:X:\Sources\install.wim:INDEX /LimitAccess
Replace X with the correct drive letter and INDEX with the appropriate edition index.
If your installation media contains install.esd instead, use the esd source format:
DISM /Online /Cleanup-Image /RestoreHealth /Source:esd:X:\Sources\install.esd:INDEX /LimitAccess
The repair source must be compatible with your installed Windows version. An incompatible image may cause another repair failure.
Faqs
Does DISM RestoreHealth delete personal files?
No. The standard DISM /Online /Cleanup-Image /RestoreHealth command is designed to repair Windows components. It does not normally delete your personal documents, photographs, or installed applications.
However, maintaining a backup before performing system repairs is always a smart precaution.
Is DISM RestoreHealth safe to run?
Yes. It is an official Microsoft Windows servicing command. When executed correctly, it is generally safe for repairing component store corruption.
Make sure you use an elevated Command Prompt and avoid interrupting the operation.
Should I run DISM or SFC first?
For suspected Windows component corruption, the recommended sequence is DISM first, followed by SFC.
DISM repairs the component store, while SFC uses healthy system components to repair protected Windows files.
Does DISM RestoreHealth require an internet connection?
Not always. DISM may use Windows Update to obtain repair files when needed. However, you can provide a compatible local Windows installation image as a repair source if necessary.
How long does DISM RestoreHealth take?
It depends on your hardware, Windows installation, and repair requirements. Some systems finish within 10 to 30 minutes, while others take longer.
Avoid interrupting the process just because the progress percentage hasn’t changed recently.
Can I run DISM RestoreHealth on Windows 11?
Yes. DISM RestoreHealth works on Windows 11 and is also available on supported Windows 10 installations.
The exact repair source requirements can vary depending on your Windows version and installation configuration.
What happens if DISM says the restore operation completed successfully?
It means DISM successfully completed the requested repair operation. For a more complete system check, run SFC /scannow afterward and restart your PC.
Can DISM fix Windows Update errors?
It can help when Windows Update problems are caused by component store corruption. However, not every update error is related to damaged Windows components, so additional troubleshooting may be required.
Final Thoughts
The DISM /Online /Cleanup-Image /RestoreHealth command is an important troubleshooting tool for Windows users. It helps identify and repair component store corruption that can contribute to system instability, failed updates, and other Windows problems.
The process is straightforward once you understand how it works. Open Command Prompt as administrator, execute the command, wait for the repair to finish, and review the result.
For the best troubleshooting approach, follow it with SFC /scannow and restart your computer.
Remember, DISM isn’t a universal fix for every Windows problem. It cannot automatically resolve hardware failures, malware infections, incompatible drivers, or every Windows Update issue.
Still, when you’re dealing with corrupted Windows components, it’s one of the most useful commands to try before considering more disruptive repair options.