How to Run SFC and DISM Commands to Repair Windows

If Windows is experiencing corrupted system files, crashes, update problems, or other unusual errors, the built-in Deployment Image Servicing and Management (DISM) and System File Checker (SFC) tools can help repair Windows corruption.

This guide explains how to run DISM RestoreHealth followed by SFC /Scannow, understand the results, and identify when additional troubleshooting is needed. An embedded MDTechVideos tutorial provides a visual walkthrough of the SFC scan.

Quick Repair Commands

1. Run DISM first:

DISM.exe /Online /Cleanup-Image /RestoreHealth

2. After DISM finishes, run SFC:

sfc /scannow

Important: Open Command Prompt as administrator and run the commands one at a time. Allow each command to finish before running the next.

Watch the MDTechVideos Tutorial

In “Use SFC scannow to Repair Windows System Files [Tutorial],” MDTechVideos demonstrates opening Command Prompt as administrator, running sfc /scannow, waiting for the scan to finish, and restarting the computer.

Published July 22, 2021. This video demonstrates SFC on Windows 11. For the two-stage repair procedure in this article, complete DISM first, then follow the video's SFC steps.

If the embedded player is unavailable, watch the MDTechVideos tutorial on YouTube .

What Are DISM and SFC?

DISM can check and repair the Windows component store. SFC scans protected Windows system files and attempts to replace incorrect or corrupted files with correct versions.

They perform different jobs. Repairing the component store with DISM first can help provide a healthy repair source before SFC checks individual system files.

These tools target Windows corruption. They do not guarantee a fix for failing hardware, incompatible drivers, third-party application bugs, or every Windows Update error.

Before You Start

Save your work and open an administrator Command Prompt:

  1. Open the Start menu.
  2. Type Command Prompt or cmd.
  3. Right-click Command Prompt.
  4. Select Run as administrator.
  5. Approve the permission prompt if you are authorized to do so.
Let each operation finish: Do not close the command window or restart while a scan is running. Progress may remain at one percentage for a while.
Scope of this guide: These commands are for the currently running Windows installation. Repairing Windows from recovery media or repairing an offline installation requires different options and the correct installation paths.

Step 1: Run DISM RestoreHealth

Copy the following command into the administrator Command Prompt and press Enter:

DISM.exe /Online /Cleanup-Image /RestoreHealth

The command options mean:

  • /Online targets the currently running Windows installation. It does not simply mean “connect to the internet.”
  • /Cleanup-Image selects Windows image servicing operations.
  • /RestoreHealth scans for component-store corruption and attempts repairs.

Allow the operation to finish and read its final message. Depending on the repair configuration, DISM may obtain repair files through Windows Update or another configured source.

Step 2: Run SFC /Scannow

After DISM finishes, run System File Checker:

sfc /scannow

Press Enter and wait for the scan to complete. SFC checks protected system files and repairs problems when possible.

The embedded MDTechVideos tutorial demonstrates this part of the process if you want to follow along visually.

Understand the SFC Results

Windows Resource Protection did not find any integrity violations

SFC did not find corruption in the protected system files it checked. This does not rule out other causes of your original problem.

Windows Resource Protection found corrupt files and successfully repaired them

SFC found corruption and repaired it. Restart Windows and test whether the original problem has been resolved.

Windows Resource Protection found corrupt files but was unable to fix some of them

SFC could not repair every affected file. If you have not already run DISM, complete the RestoreHealth step and then run SFC again.

If DISM fails or SFC continues reporting unrepaired corruption, record the exact messages and review Microsoft's repair guidance. Repeatedly running the same commands without addressing the reported error may not resolve the issue.

Optional DISM Health Checks

The following commands help assess component-store health. Neither command performs the repairs done by RestoreHealth.

CheckHealth

CheckHealth reports whether the image has already been flagged as corrupted and whether it is repairable. It does not perform a new, full corruption scan.

DISM.exe /Online /Cleanup-Image /CheckHealth

ScanHealth

ScanHealth performs a more extensive scan for component-store corruption.

DISM.exe /Online /Cleanup-Image /ScanHealth

These checks are optional for the repair procedure above. RestoreHealth performs its own scan and attempts repairs.

What If DISM Appears Stuck?

An unchanged progress percentage does not necessarily mean DISM has stopped working. Give it time to complete rather than immediately closing the window.

There is no guaranteed completion time. Repair duration varies with system performance, corruption, and the availability of repair files.

What If Source Files Could Not Be Found?

This message means DISM could not obtain the files needed for the repair. Microsoft documents the /Source option for supplying an alternative repair source.

Do not copy a random source path or assume any Windows ISO will work. The source must be suitable for the Windows installation you are repairing, and the command depends on the source format and location.

Record the error code and consult Microsoft's “Repair a Windows Image” documentation linked below before attempting a source-based repair. On a managed computer, contact your IT administrator.

After Running Both Commands

When both operations have finished, restart Windows and test the original symptom.

Simple Repair Procedure

  1. Open Command Prompt as administrator.
  2. Run DISM.exe /Online /Cleanup-Image /RestoreHealth.
  3. Wait for DISM to finish and read the result.
  4. Run sfc /scannow.
  5. Wait for SFC to finish and read the result.
  6. Restart Windows and test again.

Frequently Asked Questions

Should I run SFC or DISM first?

For the two-stage procedure in this article, run DISM RestoreHealth first, then SFC /Scannow. An SFC scan can also be run independently; DISM is particularly useful when component-store problems prevent successful repairs.

Do I need administrator access?

Yes. Run Command Prompt as administrator.

Can I use these commands on Windows 10 and Windows 11?

Yes. The commands shown target the currently running Windows installation on Windows 10 and Windows 11.

Can I close the window while a scan is running?

Let the operation finish before closing the window or restarting.

Does /Online mean an internet connection is required?

No. It identifies the running Windows installation. However, an internet connection may be needed if DISM obtains repair files from Windows Update rather than another available source.

Will these commands fix every Windows crash?

No. They repair specific forms of Windows corruption. Driver problems, failing hardware, and application errors may need separate diagnosis.

Microsoft Documentation and Video

If a Copy button is blocked or unavailable, select the command text and copy it manually. If repairs do not resolve the problem, use the exact error or symptom to guide further troubleshooting.

``` The command explanations and optional health checks follow Microsoft’s DISM and SFC documentation. [learn.microsoft](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/repair-a-windows-image?view=windows-11)

Comments

Popular posts from this blog

Windows 10 ISO — From Microsoft

Windows 11

Fix IRQL_NOT_LESS_OR_EQUAL Blue Screen Error