Windows

Running the DISM Command in Windows: A Complete Repair Guide

DISM (Deployment Image Servicing and Management) is a powerful command-line tool for repairing corrupted Windows images. In this guide, you'll learn how to run DISM, analyze system status, and restore system integrity.

Updated at February 15, 2026
15-30 minutes
Medium
FixPedia Team
Применимо к:Windows 10Windows 11Windows Server 2016+

Introduction / Why This Is Needed

The DISM (Deployment Image Servicing and Management) tool is a built-in Windows command-line utility designed for servicing and repairing Windows images. Unlike sfc /scannow, which works with already loaded files in the C:\Windows\System32 folder, DISM operates on the Component Store (C:\Windows\WinSxS)—the source of reference system files.

If you encounter errors during Windows updates, system crashes, or if sfc /scannow fails to fix corruption, running DISM often resolves the problem at the root level. This guide will show you how to safely use DISM to analyze and restore your system's health.


Requirements / Preparation

Before you begin, ensure the following:

  1. Administrator privileges. All DISM commands require running as an administrator.
  2. Stable internet connection. When using the /RestoreHealth parameter without specifying a source, DISM automatically downloads healthy files from Windows Update. If there is no internet, you will need to specify a local source manually (see step 4).
  3. Sufficient free space on the system drive (at least 2-3 GB) for temporary recovery files.
  4. No active background update processes. It's best to perform this in "clean" mode or after a reboot.

Step-by-Step Instructions

Step 1: Open Command Prompt or PowerShell as Administrator

  1. Press the Win + X key combination.
  2. In the menu that appears, select "Windows PowerShell (Admin)" (in Windows 10/11) or "Command Prompt (Admin)".
  3. If a User Account Control (UAC) prompt appears, click "Yes".

In the opened window, you will see a command prompt, for example, C:\Windows\system32>.

Step 2: Perform a Primary Health Check of the Image

Enter the following command and press Enter:

dism /online /cleanup-image /checkhealth
  • /online — specifies that we are working with the currently running operating system.
  • /cleanup-image — the action to perform on the image.
  • /checkhealth — a quick check to see if a full scan is required.

What you will see: If everything is fine, after a few seconds you will see the message "The operation completed successfully" and "Image status: Healthy". If there are issues, it will indicate "Image status: Requires repair". This step does not fix errors, it only diagnoses.

For a full diagnosis, run:

dism /online /cleanup-image /scanhealth

This command deeply checks the Component Store (WinSxS) for inconsistencies and corrupted files. The process can take anywhere from 5 to 20 minutes.

Interpreting the result:

  • "The operation completed successfully" — no corruption detected.
  • "Image status: Healthy" — the image is intact.
  • "Image status: Requires repair" — errors were found that need to be fixed in the next step.

Step 4: Repair the Corrupted System Image

This is the key step. Enter the command:

dism /online /cleanup-image /restorehealth

DISM will begin the repair process:

  1. Search for replacement files in the local store.
  2. If local files are insufficient, automatically connect to Windows Update to download them.
  3. Replace corrupted or missing components.

Important nuances:

  • Execution time: 10 to 30 minutes. Do not interrupt the process.
  • If DISM cannot find sources: You will receive an error like 0x800f081f. This means Windows Update is unavailable or the local store is too corrupted. In this case, specify a source manually. For example, if you have a Windows 10 ISO:
    dism /online /cleanup-image /restorehealth /source:WIM:X:\Sources\Install.wim:1 /limitaccess
    
    Where X:\ is the drive letter of the mounted image, and :1 is the image index in the WIM file (usually 1 for Windows 10/11). Use /limitaccess to prevent DISM from accessing Windows Update.
  • For Windows Server: You often need to specify a source as a path to the sources\sxs folder from the installation media.

Step 5: Re-check the Health Status After Repair

After step 4 completes, run the command from step 2 again:

dism /online /cleanup-image /checkhealth

Expected result: "Image status: Healthy". If the status is still "Requires repair", try:

  1. Run step 4 again (sometimes multiple attempts are needed).
  2. Specify an explicit source (see step 4).
  3. Run dism /online /cleanup-image /startcomponentcleanup /resetbase (caution! this will delete old component versions to free space, but rollback will become impossible).

Step 6: Run System File Checker (SFC) to Finalize

After successfully repairing the DISM image, run the standard system file check:

sfc /scannow

Now sfc will be able to function correctly because the Component Store is fixed. After it completes (which can take 15-30 minutes), restart your computer.


Verifying the Result

  1. Primary indicator: Successful execution of dism /checkhealth and sfc /scannow without error messages.
  2. Practical test: Try to perform an action that previously caused problems (e.g., install a Windows update, launch a problematic application). The errors should be gone.
  3. Logs: For detailed analysis, check the DISM logs:
    • Main log: C:\Windows\Logs\DISM\dism.log
    • Log for /RestoreHealth: C:\Windows\Logs\DISM\RestoreHealth.log

Potential Issues

Error 0x800f081f — "The source files could not be found"

Cause: DISM cannot find the necessary files for repair locally or via Windows Update. Solution:

  1. Ensure the computer is connected to the internet and can access windowsupdate.microsoft.com (sometimes blocked by a firewall or proxy).
  2. Specify an explicit source (see step 4). You will need installation media (ISO or DVD) of the same version and build of Windows as your installed system. Find your build number via Win + Rwinver.
  3. If a source is specified but the error persists, the image on the media might be corrupted. Try downloading a fresh ISO from the official Microsoft website.

Access Denied or 0x80070005 Error

Cause: Command Prompt / PowerShell was not run as Administrator. Solution: Close the current window, open a new one strictly as Administrator (Win + X → the appropriate item).

Prolonged Hang at "Restoring" Stage

Cause: Network issues (slow or unstable connection when downloading files from Windows Update) or insufficient space on the C: drive. Solution:

  1. Check free space on the system drive (at least 3-4 GB required).
  2. If the internet is slow, use a local source (step 4). This will significantly speed up the process.
  3. If it hangs for more than 1-2 hours, you can press Ctrl + C to cancel, then retry with a local source.

dism Command Not Found

Cause: You launched the wrong shell or the path to system folders is missing from the PATH variable. Solution: Ensure you are in the standard Command Prompt or PowerShell (not third-party terminals). The best option is to use PowerShell as Administrator from the Win+X menu. If that doesn't work, navigate to the C:\Windows\System32 folder and run dism.exe from there.

F.A.Q.

What is the difference between SFC and DISM?
Can DISM be run without internet?
Is using DISM dangerous? Can it break the system?
Why can't DISM find restore sources?

Hints

Open Command Prompt or PowerShell as Administrator
Perform a primary analysis of the image status
Run a detailed scan for corruption (optional but recommended)
Restore the corrupted system image
Recheck the status after restoration
Run System File Checker (SFC) to complete

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community