Introduction / Why This Is Needed
DISM (Deployment Image Servicing and Management) is a powerful built-in Windows command-line tool designed for servicing the operating system image. Unlike the sfc /scannow utility, which works with the currently running system, DISM can repair the Windows Component Store itself—the repository on which the successful installation of updates, features, and even the operation of system files depend.
This guide will help you:
- Fix Windows update errors (for example, codes
0x800f081f,0x80073701). - Restore system functionality after crashes, virus attacks, or incorrect software removal.
- Prepare the system for stable operation without needing a full OS reinstall.
Requirements / Preparation
- Administrator privileges. All DISM commands require running as an administrator.
- Stable internet connection. By default, DISM for the
/RestoreHealthparameter attempts to download fixes via Windows Update. If there is no internet, you will need to explicitly specify a local source (a bootable Windows media). - Sufficient free space on the system drive (at least 2-3 GB).
- Antivirus must be disabled during the operations (some AV software may block access to system files).
- Backup important data (just in case, although the DISM process itself does not affect user files).
Step-by-Step Instructions
Step 1: Analyze the Current State
Open Command Prompt or PowerShell as an administrator and run the command for a quick check:
DISM /Online /Cleanup-Image /CheckHealth
/Online— specifies that we are working with the current running system./Cleanup-Image— the image operation./CheckHealth— a quick analysis that determines if the image has already been marked as corrupted.
If the result shows No component store corruption detected, that's good. However, for certainty, perform a deeper scan.
Step 2: Deep Scan for Corruption
Run the command for a full check of the component store:
DISM /Online /Cleanup-Image /ScanHealth
This process will take several minutes. It thoroughly checks the integrity of all entries in the Component Store (C:\Windows\WinSxS). If you see The component store is repairable in the output, recovery is possible and necessary.
Step 3: Restore the Windows Image
This is the key step. DISM will attempt to find and replace corrupted files on its own.
DISM /Online /Cleanup-Image /RestoreHealth
What happens:
- The tool looks for fixable files in the local cache (
C:\Windows\SoftwareDistribution\Download). - If they are not there, it connects to Windows Update (if internet is available) and downloads the necessary components.
- It replaces corrupted or missing files in the component store.
Expected time: 10 to 30 minutes, depending on disk speed and internet.
⚠️ Important: Do not interrupt the process by forcibly shutting down the PC. This could render the system unusable.
Step 4: Alternative Recovery Option Using a Local Source
If Step 3 fails with an error (for example, 0x800f081f - The source files could not be found), DISM could not find suitable files for recovery. You need to specify the source manually.
- Prepare a bootable USB media with the same or a newer version of Windows (for example, Media Creation Tool for Windows 10/11).
- Determine the drive letter it is mounted as (for example,
E:\). - Run the command, specifying the path to the image file (
install.wimorinstall.esd) and the version index (usually1for Windows 10/11 Home/Pro):
DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:E:\Sources\Install.wim:1 /LimitAccess
/Source— path to the source image./LimitAccess— prevents DISM from accessing Windows Update, using only the specified source.
Step 5: Clean Up Temporary and Obsolete Components
After successful recovery, it is recommended to perform a cleanup to free up space and avoid future conflicts:
DISM /Online /Cleanup-Image /StartComponentCleanup
This command removes old versions of files from the component store that are no longer needed. The process may take a few minutes.
Step 6: Final Check and Reboot
- After all operations, restart the computer.
- For final assurance of system file integrity, run the classic check:
sfc /scannow - Try to install the update or feature that originally caused problems.
Verifying the Result
A successful DISM completion will look like this:
The operation completed successfully.
Restore state: Image restored.
If after all steps you are still experiencing update errors or unstable system operation, the problem may be deeper (user profile corruption, drivers, hardware failures). In this case, consider System Restore via a restore point or Windows Reset while keeping personal files.
Possible Issues
| Symptom / Error | Likely Cause | Solution |
|---|---|---|
Error: 0x800f081f | DISM cannot find the source files for recovery. | Specify the source manually (/Source), as described in Step 4. Ensure the bootable media matches the version and architecture (x64/x86) of your system. |
Error: 0x80070490 | Component store corruption that DISM cannot fix automatically. | Try running the cleanup (/StartComponentCleanup) and then retry /RestoreHealth. If that doesn't help, use a local source. |
| Process hangs at 0% or 100% | Conflict with antivirus, disk issues, corrupted source image. | Disable antivirus. Check the disk for errors (chkdsk /f). Ensure the bootable media is not corrupted (recreate it). |
Access is denied | Command was not run as administrator. | Close and re-open Command Prompt/PowerShell as an administrator. |
Not enough space on C: drive | Temporary recovery files require free space. | Clean the drive using "Disk Cleanup" (cleanmgr), delete temporary files, move personal data to another drive. |