Skip to content

How-ToOS

How to Repair Windows 11 System Files With DISM and SFC

Microsoft recommends running DISM /Online /Cleanup-image /Restorehealth first, then sfc /scannow, from an administrator Command Prompt to repair missing or corrupted Windows system files. Here's what each SFC result means, how to view the log, and what to do if repairs fail.

By , Editorial team

2 min read

How to Repair Windows 11 System Files With DISM and SFC

When Windows system files go missing or get corrupted, Microsoft says common symptoms include Windows features not working properly, system errors, or Windows becoming unresponsive or freezing. Before you reinstall anything, Windows 11 has two built-in repair tools: DISM (Deployment Image Servicing and Management) and SFC (System File Checker). This guide follows Microsoft's own instructions; Forge PC hasn't tested every error with them, and they won't fix faulty hardware.

Before you start

Step 1: open an elevated Command Prompt

Type cmd in the Start menu search, right-click Command Prompt and choose Run as administrator. Approve the prompt.

Step 2 (optional): check the Windows image

Microsoft Learn describes two quick checks:

  • Dism /Online /Cleanup-Image /CheckHealth reports whether the image is healthy, repairable or non-repairable.

  • Dism /Online /Cleanup-Image /ScanHealth scans for corruption and takes several minutes.

Step 3: run DISM RestoreHealth

Microsoft recommends running DISM before SFC, because DISM provides the files SFC needs. Type:

DISM.exe /Online /Cleanup-image /Restorehealth

It may take several minutes. DISM uses Windows Update as the source of repair files. If Windows Update itself is broken, Microsoft says you can point DISM at another source, such as a Windows installation or install media, with /Source: and /LimitAccess. If updates are stuck, see how to fix Windows Update stuck in Windows 11.

Step 4: run SFC

Then type:

sfc /scannow

SFC scans all protected system files and replaces corrupted ones with a cached copy. Don't close the window until verification reaches 100%.

Step 5: read the result

Microsoft lists four messages:

Message

What it means

Windows Resource Protection did not find any integrity violations

No missing or corrupted system files

Windows Resource Protection found corrupt files and successfully repaired them

The repair was successful

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

See the CBS log for details

Windows Resource Protection could not perform the requested operation

Run SFC in Safe Mode, and check the PendingDeletes and PendingRenames folders exist under %WinDir%\WinSxS\Temp

For Safe Mode, our Safe Mode vs clean boot guide explains how to get there.

Step 6: view the details (if needed)

Microsoft's command to copy SFC's entries from the CBS log to a text file on your desktop is:

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

If it still doesn't work

Microsoft's article goes on to describe manually replacing a corrupted file with a known good copy, and says that if the steps don't work you may need to reinstall Windows using its recovery options. A System Restore point is worth trying first.

Our verdict

Run DISM /RestoreHealth first, then sfc /scannow, from an administrator Command Prompt, and read SFC's result message. If SFC can't run, try Safe Mode; if problems persist, use System Restore or Windows' recovery options.

The bottom line

Run DISM /RestoreHealth first, then sfc /scannow, from an administrator Command Prompt, and read SFC's result message. If SFC can't run, try Safe Mode; if problems persist, use System Restore or Windows' recovery options.

Sources

  1. 01Microsoft Support, Use the System File Checker tool to repair missing or corrupted system files
  2. 02Microsoft Learn, Repair a Windows Image

About the author

Forge PC Staff

Editorial team

The shared byline for articles researched, written and edited by the Forge PC editorial team. How we source, check and correct our work is set out in our editorial policy.

More from Forge PC Staff

Read next

How to Check Your Wi-Fi Signal Strength in Windows 11

How-To

How to Check Your Wi-Fi Signal Strength in Windows 11

Check Wi-Fi signal strength in Windows 11 from the taskbar bars, Settings > Network & internet, or exactly with netsh wlan show interfaces (the Signal percentage). Windows Central treats 80-100% as reliable and below 60% as weak. netsh wlan show wlanreport summarises recent wireless sessions.

Forge PC Staff2 min

How to Fix Windows Search Not Working in Windows 11

How-To

How to Fix Windows Search Not Working in Windows 11

If Windows 11 search stops finding files or apps, follow Microsoft's fixes in order: end SearchHost.exe in Task Manager, install updates, run the Search and Indexing troubleshooter, check Classic or Enhanced indexed locations, then rebuild the index and allow up to 24 hours.

Forge PC Staff3 min

How to Turn On the New Run Dialog in Windows 11 (and What's Changed)

How-To

How to Turn On the New Run Dialog in Windows 11 (and What's Changed)

Windows 11's KB5132057 preview update adds an opt-in redesigned Run dialog with Fluent Design, dark mode, a ~\ shortcut to your user folder and, by Microsoft's measurement, a 94ms median time-to-show. Turn it on in Settings > System > Advanced > New Run dialog, and off again the same way.

Forge PC Staff2 min

MBR vs GPT: Which Partition Style Should Your SSD Use in Windows 11?

Versus

MBR vs GPT: Which Partition Style Should Your SSD Use in Windows 11?

GPT is the modern partition style: Windows allows up to 128 partitions, each with a unique GUID, and 64-bit Windows boots from GPT on UEFI systems. MBR supports four primary partition entries and suits only very old hardware. Microsoft's MBR2GPT converts a system disk without deleting data.

Forge PC Staff2 min