How to Repair Windows 10 System Files With SFC and DISM?

DISM and SFC steps from Microsoft.

Fact-checked Reviewed by Aswin Vijayan Updated November 17, 2026 Based on 3 sources
Summary

How to repair Windows 10 system files? Open Command Prompt as administrator, run DISM first with DISM.exe /Online /Cleanup-image /Restorehealth, and then run sfc /scannow. Keep the window open until the scan reaches 100%. Microsoft says DISM repairs the component store that System File Checker uses as its source of good files, which is why the order matters.

Why Do Windows System Files Need Repair?

When critical system files are missing or corrupted, Windows may misbehave. Microsoft lists symptoms such as features that do not work, system errors, and freezing or unresponsiveness. The two built-in tools for this are DISM (Deployment Image Servicing and Management) and System File Checker (SFC). Microsoft's page says both apply to Windows 8.1 through Windows 11, including Windows 10, and you do not need to download anything.

How to Repair Windows 10 System Files: Step by Step

Step 1: Open Command Prompt as Administrator

  1. Type cmd in the Windows search box.
  2. Right-click Command Prompt in the results and choose Run as administrator.
  3. If prompted, confirm or enter an administrator password, or select Allow.

Step 2: Run DISM First

In the elevated Command Prompt, enter DISM.exe /Online /Cleanup-image /Restorehealth and press Enter. This can take several minutes. DISM normally downloads replacement files from Windows Update. If Windows Update is broken, you can point DISM at another source, such as a running Windows installation or a side-by-side Windows folder on a network share or removable media. Add the /Source switch with your folder and the /LimitAccess switch, as shown in Microsoft's repair guide.

For a closer look, Microsoft's DISM documentation describes three health commands. /ScanHealth scans the image for corruption and takes several minutes. /CheckHealth reports the current status: Healthy, Repairable or Non-repairable. /RestoreHealth repairs a repairable image. If you leave out /Source, DISM uses the Features on Demand source that Group Policy settings determine. The DISM restorehealth step is the one that repairs the store, so do not skip it.

Step 3: Run System File Checker

In the same elevated window, enter sfc /scannow and press Enter. SFC scans all protected system files and replaces corrupted ones with a cached copy. Do not close the window before the scan reaches 100%, because closing it early can interrupt the repair. Many people use the SFC scannow command alone, but Microsoft's order is DISM first, then SFC. If the first scannow run reports unfixed files, repeat the DISM restorehealth command and run sfc scannow again.

Step 4: Read the SFC Result

SFC messageWhat it meansWhat to do
Did not find any integrity violationsNo missing or corrupted filesNothing
Could not perform the requested operationThe scan could not runRun SFC in Safe Mode and confirm the PendingDeletes and PendingRenames folders exist in %WinDir%\WinSxS\Temp
Found corrupt files and successfully repaired themProblem files were fixedNothing further
Found corrupt files but was unable to fix some of themSome files could not be repairedFind them in CBS.log and replace them manually

Step 5: Check CBS.log if Files Remain Unfixed

SFC records its activity in CBS.log. To pull the SFC entries into a readable file, open an elevated Command Prompt and enter findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt". Open sfcdetails.txt on your desktop. The file holds entries from every SFC run, so check the dates to find the latest one. Failed repairs name the file that could not be fixed.

Step 6: Replace a Damaged File Manually, Only if Needed

Use this only for files SFC could not repair. Run takeown /f with the file path, then icacls with /grant administrators:F, then copy a known good version over the damaged file. The good copy should come from a computer running the same Windows version, and you should run SFC on that computer first to confirm the file is intact. Manual replacement carries risk, so use only verified copies.

What if the Repair Does Not Work?

Microsoft recommends reinstalling Windows if these steps do not solve the problem. Its recovery options page lists Reset this PC with the keep my files option, System Restore and reinstall routes, and warns that some options can cause data loss, so back up important files first. For a plan, see our guide to the Windows NT Backup restore utility for Windows 10 and how to recover deleted data from a desktop computer.

What Do These Sources Not Say?

The SFC page does not describe a dedicated offline SFC procedure. It only mentions Safe Mode and an external DISM source. The DISM documentation does not state how long each command runs beyond several minutes, or what permissions are required. The recovery page does not describe Startup Repair and only links to another article. None of the pages explain why files become corrupted in the first place.

Frequently Asked Questions

What is the order to run DISM and SFC?

Run DISM first, then sfc /scannow, so SFC has a healthy store to pull files from.

How long does DISM take?

Microsoft says several minutes. It gives no exact time.

Can I close the window during the scan?

No. Wait until the scan reaches 100%, or the repair may be interrupted.

Where are the SFC results saved?

In CBS.log. Extract the entries with the findstr command to a file on your desktop.

What if Windows Update is broken?

Use DISM with the /Source and /LimitAccess switches and point it at a Windows folder on another source.

Key Takeaways

  • How to repair Windows 10 system files: run DISM before SFC in an administrator window.
  • Read the SFC message and use CBS.log to find files it could not fix.
  • Replace files by hand only from a matching Windows version.
  • Back up your files before you try Reset this PC or reinstall Windows.

Sources and References

Facts follow Microsoft Support and Microsoft Learn.

  1. Use the System File Checker tool to repair missing or corrupted system files, Microsoft Support support.microsoft.com
  2. Recovery options in Windows, Microsoft Support support.microsoft.com
  3. Repair a Windows Image, Microsoft Learn learn.microsoft.com