How to Use DISM to Repair Windows: A Complete, Detailed Guide

Last update: 02/06/2025
Author Isaac
  • DISM and SFC are essential tools to repair files and image. Windows when serious errors appear.
  • The correct process is to run SFC first and if that does not resolve the problem, use DISM with its various commands.
  • Repairing with DISM can fix errors Windows Update and avoid complete reinstallations, although in extreme cases it may be necessary to restore the entire system.

Repair Windows with DISM

Is your computer giving you trouble and you're getting errors that you don't know where they're coming from? Are you experiencing programs that won't open, blue screens appear, or Windows is behaving strangely? If you've tried everything and can't get your system back to a stable state, you'll want to learn how to use DISM and SFC, two essential tools for repairing Windows without losing your mind.

Here's the ultimate guide on how to use DISM (Deployment Image Servicing and Management) and SFC (System File Checker) to bring your Windows operating system back to life. Whether you're using Windows 10, 11, or 8, here you'll learn everything you need to know to detect and repair corrupted files, understand the different commands, what to do if something goes wrong, and when it's time to take more drastic measures.

What is DISM and what is it used for?

What is DISM

DISM stands for Deployment Image Servicing and Management, a command-line tool integrated into Windows Designed primarily for administrators and advanced users, but also accessible to anyone eager to learn. Its main function is Check and repair the Windows image, that is, the internal “photo” that the system uses to restore itself when critical files become corrupted.

Why is this so important? Because Windows, although generally robust, can be damaged by failed updates, power outages, viruses, faulty software, or simply the passage of time. When this happens, symptoms such as extreme slowness, random crashes, errors installing updates, applications that won't start, problems turning on the computer can appear... And this is where DISM comes in as your great ally.

The best of all is that DISM acts at a deeper level than SFC. While SFC attempts to repair corrupted files by comparing them with a local copy saved on your system, DISM, if needed, Download original files directly from Microsoft servers to replace damaged or lost ones. Thus, it is capable of fixing problems that SFC alone cannot solve.

Check with DISM and SFC in Windows 1
Related article:
How to Check and Repair System Files in Windows with DISM and SFC

How is DISM different from SFC and CHKDSK?

DISM SFC CHKDSK Comparison

Before we get into the nitty-gritty, it's important to be clear what each of these tools does and when to use them:

  • CHKDSK (Check Disk): Scans and repairs errors on the hard drive and file system (NTFS, FAT, etc.), but does not touch Windows system files.
  • SFC (System File Checker): It scans protected operating system files and compares them with a cached copy (WFP) to repair or restore damaged or missing files. This is the recommended first step when you suspect something is wrong with Windows.
  • DISM: It works when corruption affects the Windows master image or the cache that SFC uses to restore files. If SFC fails to resolve the issues, then DISM is a must.
  How to browse and edit .mui files in Windows

In summary: Start with SFC first. If it can't fix the problem and notifies you that it couldn't repair the corrupted files, DISM is your next option. And if the hard drive itself is failing (strange noises, slowness, read errors), you should start with CHKDSK.

Main causes of corruption in Windows

On Windows system files can be damaged by a multitude of causesSome are unavoidable, others are due to human or technical error. Let's look at the most common reasons:

  • Incomplete or failed updates: If an update is interrupted, the power goes out, or the computer is force-restarted, there may be corrupt files in the system.
  • Malware or virus: Malicious programs often attack critical areas of the system to gain control or render it unstable.
  • Problems in the hardware: Old hard drives, faulty SSDs, damaged RAM, or power surges can corrupt essential files.
  • Unexpected closures or blockages: A sudden shutdown or freezing of your computer during important tasks (such as an update) can corrupt files.
  • Software bugs: Poorly designed or incompatible programs can accidentally modify system files.

When this happens, the famous messages “Windows could not repair the system,” “The application cannot start because a DLL file is missing,” update errors, blue screens, and other unpleasant symptoms appear.

DISM and SFC: When and How to Use Them?

The best strategy to repair corrupted files in Windows is to use SFC first and resort to DISM if SFC fails.

This would be the 'winning combo':

  1. Run SFC: Open the symbol of the system as administrator and type: sfc / scannow
  2. If SFC reports that it has repaired corrupted files, great! Reboot and check your system. If it says that could not repair some files, go to the next step.
  3. Start DISM: Open Command Prompt as an administrator and follow the steps in this guide to scan and repair your Windows image.
How to repair Windows 11 from cmd-1
Related article:
Complete Guide to Repairing Windows 11 from CMD: Step-by-Step Solutions

Basic DISM Commands: CheckHealth, ScanHealth, and RestoreHealth

DISM has three essential commands for Windows image repair:

  • /CheckHealth: It performs a quick check to determine if the system image has been corrupted. It doesn't repair or scan in depth, it just provides information.
  • /ScanHealth: Performs a full scan of the Windows image for corrupted files. This may take a while, depending on the state of the system.
  • /RestoreHealth: If corruption is detected, this command attempts to repair it using local files or by downloading the original files from Microsoft servers.

The correct order would be to execute them in sequence: first / Check Health, then / Scan Health, and finally / RestoreHealth if the above indicate problems.

How to run DISM step by step

Let's see how to get the most out of DISM from the command prompt (DCM) with administrator permissions:

  1. Open the start menu, type cmd and right-click on “Command Prompt” to select Run as administrator.
  2. Enter the following commands one by one, waiting for each one to finish before moving on to the next:
DISM / Online / Cleanup Image / CheckHealth
DISM / Online / Cleanup Image / ScanHealth
DISM / Online / Cleanup Image / RestoreHealth

IMPORTANT: Don't start a command before the previous one has finished. Be patient, especially with ScanHealth and RestoreHealth: depending on the size of your installation and the number of corrupted files, these can take from a few minutes to several hours.

  The right way to Shortly Lock Display screen In Home windows 10

What happens in each phase of DISM?

CheckHealth: Just check for any registered corruption in the Windows image. If it doesn't detect anything, your image is fine. If it finds anything, it will notify you, and you can move on to the next step.

ScanHealth: It performs a deep analysis, comparing the files with the original logs and manifest. If it detects corruption, it reports it but doesn't repair it yet.

RestoreHealth: This is the phase in which DISM attempts to repair damage by downloading original files from Windows Update or from a specific source that you specify.

What if DISM can’t repair the image?

Sometimes, DISM may give you errors like “no source files found” or codes such as 0x800f081f, 0x800f0831, among others. This could be due to the system being unable to connect to Windows Update, corrupted source files, or other causes such as antivirus blocking or incorrect service configuration.

Solution: You can manually specify a healthy file source. You need a Windows installation medium (ISO, USB) of the same edition, version, and language as your current system. For example, use the following command (adjust the path accordingly):

DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\sources\install.wim /LimitAccess

This tells DISM to use files from the specified media and not rely on Windows Update.

DISM via PowerShell: How to Do It

You can also perform all these operations from PowerShell with administrator permissions. The equivalent commands would be:

  • Repair-WindowsImage -Online -CheckHealth
  • Repair-WindowsImage -Online -ScanHealth
  • Repair-WindowsImage -Online-RestoreHealth

Running them will give you the same results but in a different environment. This is useful if you prefer working with PowerShell or automating tasks using scripts.

Use Netsh on Windows 11-7
Related article:
How to Use Netsh on Windows 11: A Complete, Detailed Guide to Managing and Repairing Your Network

Fix common DISM errors

Some of the most common problems that may arise when using DISM and their possible solutions are:

  • Error 0x800f0954: This can occur if you have third-party antivirus software active, a proxy configured, update services disabled, or if you're using a protected read-only ISO. Try disabling your antivirus, temporarily disabling your proxy, and making sure Windows Update services are set to "Automatic."
  • DISM Error 50: This is usually caused by an incorrect registry key. Solution: Delete the MiniNT folder in HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control using regedit and restart the system.
  • Source file error: Indicates that the necessary files cannot be found. Use the parameter /Source As explained before, with a reliable and up-to-date source.

What to do if neither SFC nor DISM can repair Windows?

If these tools fail to resolve the issues, the damage may be extensive or the system may be seriously compromised. In these cases, you have several alternatives:

  • Use restore points: From the Control Panel or in recovery mode, to return to a previous known and stable state.
  • Reset your PC: Keeping your personal files, to return the system to its initial state without deleting important data.
  • Reinstall Windows: As a last resort, be sure to back up your data before proceeding.

Use SFC when Windows won't boot

In case Windows doesn't even load, you can use a recovery USB or DVD To access repair options:

  1. Boot from the recovery media and select Solve problems > Symbol of the system.
  2. Run the command adapted to your unit, for example:
    sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

This method allows you to repair system files even without booting Windows normally.

troubleshoot boot problems in Windows 2
Related article:
How to Fix Windows Won't Boot: Complete Step-by-Step Guide

Manual: Repair files one by one if all else fails

As a last resort, if you know exactly which file is corrupted, you can manually replace it by following these steps:

  1. Take possession of the file with:
    takeown /f path\to\file
  2. Grants full permissions:
    icacls path\to\file /grant administrators:F
  3. Copy the correct file from a reliable source and replace it:
    copy correct_file.dll to destination path

Requires advanced knowledge and caution, always make a backup before modifying system files.

  Complete Guide to Setting Up a VPN on Windows 11: Methods, Tips, and Tricks

Common Windows Update Errors and How DISM Can Help

A common scenario for using DISM is when the Windows updates fail or do not install correctlySome common codes include:

  • 0x80070002: File not found.
  • 0x800f0831: Problems in the CBS warehouse.
  • 0x800F081F: File source not found.
  • 0x80073712: Inconsistencies in the component store.
  • 0x800f0984: Binaries are missing from component directories.
  • 0x800f0982: Components not compatible for hydration.

In these cases, DISM will analyze the files and automatically replace them if it finds problems. Additionally, if you need to repair Windows from scratch, you can also check out our Tutorial to repair Windows 11 from CMD.

Post-repair checks and records

After running DISM and SFC, you can check the logs in %windir%\Logs\CBS\CBS.log to check for errors, repaired files, and the progress of each step. Common messages include:

  • Windows Resource Protection found no errors: System in good condition.
  • Corrupted files repaired successfully: The repair was successful.
  • Could not repair some files: Check into safe mode or try DISM again.
  • The requested operation failed: May require reinstallation or advanced repair.

Useful tips and tricks when using DISM and SFC

  • Always run these commands in CMD as administrator.
  • Temporarily disable antivirus programs that may interfere with processes.
  • Make sure you have an internet connection, especially so DISM can download files if necessary.
  • Save all your work before starting long, resource-intensive processes.
  • On very slow or severely damaged systems, try booting into Safe Mode first.
  • Keep your system up to date and create regular restore points to prevent future problems.

When is it advisable to reinstall Windows?

The SFC and DISM tools resolve most errors, but In some cases, a complete reinstallation may be the most effective option.:

  • Errors persist after multiple repair attempts.
  • Serious infections that damage essential files.
  • Very poor performance and frequent crashes.
  • Issues with updates that are not resolved.
  • Major hardware changes.

Before reinstalling, always back up your important files.

Leave a comment