DISM Commands to Repair Windows 11 (and SFC)

The DISM and SFC commands that repair Windows 11, in the order Microsoft recommends, what each result means and what to do when DISM fails.

Add Being Tricky on Google:

Preferred Source (opens in new tab)

Cover image: "DISM and SFC" (Windows guide)

Applies to30 minutesWindows 11 (and Windows 10)November 2026

TL;DR

  • Microsoft says to run DISM before SFC
  • CheckHealth and ScanHealth only check; RestoreHealth repairs
  • SFC has four result messages, each with a different next step
  • If DISM fails, point it at install media with /Source and /LimitAccess
  • /ResetBase cleanup stops you uninstalling updates, so skip it

To repair Windows 11 with DISM and SFC, open Command Prompt as administrator and run DISM.exe /Online /Cleanup-image /Restorehealth first, then sfc /scannow. Microsoft says to run DISM before SFC, because DISM fetches the good files that SFC uses to fix corrupted ones. Each command can take several minutes. Don’t close the window until SFC reaches 100 percent.

When Windows features stop working, you see random system errors or the PC freezes, damaged system files are a common cause. Windows 11 has two built-in repair tools for this: DISM (Deployment Image Servicing and Management) and SFC (System File Checker). Below are the exact commands in the right order, what each result means, and what to do when DISM fails. Every command comes from Microsoft’s own support article and DISM reference.

DISM commands to repair Windows 11, in order

Many guides tell you to run SFC first. Microsoft’s current support article says the opposite: “You should run DISM prior to running the System File Checker.” Here’s the full sequence:

  1. Type cmd in the Search box, right-click Command Prompt in the results and choose Run as administrator. Allow it if Windows asks for confirmation.
  2. Optional quick check: type DISM /Online /Cleanup-Image /CheckHealth and press Enter. It reports whether the image has already been flagged as corrupted and whether it can be repaired.
  3. Run the repair: type DISM.exe /Online /Cleanup-image /Restorehealth and press Enter. Microsoft says it may take several minutes.
  4. When DISM finishes, type sfc /scannow and press Enter.
  5. Leave the window open until the verification reaches 100 percent, then read the result message (explained below).
  6. Restart your PC and check whether the problem is gone.
Microsoft Support article: Use the System File Checker tool to repair missing or corrupted system files
Screenshot: Microsoft Support, System File Checker article, November 24, 2026

What each DISM and SFC command does

These descriptions come from Microsoft’s DISM command-line reference and sfc reference:

CommandWhat it doesRepairs anything?
DISM /Online /Cleanup-Image /CheckHealthChecks whether the image has been flagged as corrupted by a failed process and whether that can be repaired.No
DISM /Online /Cleanup-Image /ScanHealthScans the image for component store corruption. Takes several minutes.No
DISM /Online /Cleanup-Image /RestoreHealthScans for component store corruption, then repairs it automatically. Uses Windows Update as the default source.Yes
sfc /scannowScans all protected system files and repairs files with problems when possible.Yes
sfc /verifyonlyScans protected system files without repairing them.No

In short: CheckHealth and ScanHealth only tell you if something is wrong. RestoreHealth fixes the Windows component store, and SFC then uses that store to fix the actual system files.

What the sfc /scannow results mean

SFC ends with one of four messages. Here’s what Microsoft says to do for each:

MessageWhat to do
Windows Resource Protection did not find any integrity violations.Nothing. You don’t have missing or corrupted system files, so look for another cause.
Windows Resource Protection found corrupt files and successfully repaired them.Done. Restart your PC.
Windows Resource Protection found corrupt files but was unable to fix some of them.Check the log (next section) to see which files failed, then try the DISM source fix below.
Windows Resource Protection could not perform the requested operation.Run the SFC scan in Safe Mode, and make sure the PendingDeletes and PendingRenames folders exist under C:\Windows\WinSxS\Temp.

How to see which files SFC couldn’t fix

Microsoft’s article gives a one-line command that copies SFC’s entries from the CBS log into a text file on your desktop. Run it in the same administrator Command Prompt:

findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

Add Being Tricky on Google:

Preferred Source (opens in new tab)

Open sfcdetails.txt on your desktop. It includes every SFC run on that PC, so check the date and time to find the latest one. Lines that say “Cannot repair member file” name the files that are still broken.

What to do if DISM RestoreHealth fails

DISM downloads replacement files from Windows Update by default. If Windows Update itself is broken, DISM can’t get those files. Microsoft’s fix is to point DISM at another copy of Windows, such as Windows installation media:

  1. Connect Windows installation media, such as a USB drive, or use another source Microsoft lists, such as a mounted Windows image or a shared folder from a working Windows PC.
  2. Note the path to its Windows folder or its sources\SxS folder. Microsoft’s examples include c:\test\mount\windows and z:\sources\SxS.
  3. Run DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess, replacing C:\RepairSource\Windows with your path.
  4. Run sfc /scannow again when DISM finishes.

/LimitAccess stops DISM from trying Windows Update. Microsoft’s repair source guide adds two rules: use original release media rather than refreshed media, and make sure the source is patched to at least the same cumulative update as your PC. If your PC is newer than the source, the repair may fail because it needs files the source doesn’t have.

Don’t confuse repair with cleanup. DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase shrinks the component store, but Microsoft warns that installed updates can’t be uninstalled after you use /ResetBase. It doesn’t repair anything, so skip it when you’re troubleshooting.

If DISM and SFC don’t fix Windows 11

Microsoft’s recovery options page lists the next steps from least to most disruptive when your PC starts but something isn’t right. Back up your files first; our guide to backing up a Windows PC shows how.

  1. Run a troubleshooter: Settings > System > Troubleshoot > Other troubleshooters.
  2. Reinstall Windows (Windows 11, version 22H2 or later): reinstalls your current version without affecting your files, apps or settings.
  3. Uninstall a recent Windows update if the trouble started right after one.
  4. Reset this PC: reinstalls Windows from scratch. You can keep your personal files or remove everything.

If your PC is simply slow rather than broken, start with our Windows 11 slow fixes and the Windows 11 settings worth changing instead.

Frequently asked questions

Should I run SFC or DISM first?

DISM first. Microsoft’s support article says DISM provides the files needed to repair corrupted files, so run DISM.exe /Online /Cleanup-image /Restorehealth before sfc /scannow.

Do DISM and SFC delete my files?

Microsoft describes them as tools that repair Windows system files and the component store. They aren’t among the recovery options Microsoft warns can remove personal files, such as Reset this PC or Cloud rebuild.

How long does DISM RestoreHealth take?

Microsoft only says it may take several minutes. Let it finish and don’t close the window.

What’s the difference between CheckHealth and ScanHealth?

CheckHealth looks for corruption that a failed process has already flagged, so it’s quick. ScanHealth actually scans the component store and takes several minutes. Neither one repairs anything; RestoreHealth does.

Do I need to be an administrator?

Yes. Microsoft’s sfc reference says you must be logged on as a member of the Administrators group, and both tools need an elevated Command Prompt.

Sources

  1. Microsoft Support: Use the System File Checker tool to repair missing or corrupted system files (opens in new tab)support.microsoft.com
  2. Microsoft Learn: Repair a Windows Image (opens in new tab)learn.microsoft.com
  3. Microsoft Learn: DISM Operating System Package Servicing Command-Line Options (opens in new tab)learn.microsoft.com
  4. Microsoft Learn: Configure a Windows Repair Source (opens in new tab)learn.microsoft.com
  5. Microsoft Learn: sfc (opens in new tab)learn.microsoft.com
  6. Microsoft Support: Recovery options in Windows (opens in new tab)support.microsoft.com

Want our new guides first? Add us as a preferred source and follow us in Discover, and Google will show you more of our posts.

Preferred Source (opens in new tab)

Was this guide helpful?

Written by

Founder & editor

I'm Prince Ramgarhia, founder and editor of Being Tricky. I've been writing tech how-tos and fixes since 2012, covering Android and Samsung Galaxy phones, Windows 11, WordPress and blogging, and security and AI tools. I test every Android and Windows guide on my own Galaxy S25 and Windows 11 laptop before it goes live.

  • Android & Samsung Galaxy
  • Windows 11
  • WordPress & blogging
  • Security & AI tools

Join the conversation

Your email stays private. Be kind and stay on topic. Comments are moderated.