To repair system files in Windows 11, open Command Prompt as an administrator, run DISM /Online /Cleanup-Image /RestoreHealth, then run sfc /scannow and restart when it finishes. DISM fixes the store of clean files that Windows keeps, and SFC then uses that store to replace damaged or missing system files.
This applies to Windows 11 Home and Pro on any desktop, laptop or tablet that can still reach the desktop, plus the recovery tools for a PC that will not start. Windows 10 uses the same commands, but it reached end of support on October 14, 2025.
How SFC and DISM work together
Windows keeps two sets of files that matter here. The first is the protected system files that Windows runs from, mostly inside the C:\Windows folder. The second is the component store, a folder of clean reference copies that Windows uses for repairs and updates.
- System File Checker (SFC) checks every protected system file and swaps out any that are damaged or missing, using the copies in the component store.
- Deployment Image Servicing and Management (DISM) checks the component store itself and downloads replacements from Windows Update when parts of it are damaged.
If the component store is damaged, SFC has nothing good to copy from, which is why it sometimes reports files it cannot fix. Microsoft’s instructions run DISM first for that reason, so SFC starts with clean sources.
| Tool | What it checks | Where its repair files come from | Needs internet |
|---|---|---|---|
SFC (sfc /scannow) |
Protected Windows system files | The component store on your PC | No |
DISM (/RestoreHealth) |
The component store (the Windows image) | Windows Update, or a source you name | Yes, unless you give it a local source |
| CHKDSK | The file system and the drive itself | Not a file repair tool; it fixes disk errors | No |
Signs that system files are worth checking include built-in apps or Settings pages that will not open, features that stopped working after an interrupted update or a forced shutdown, and repeated crashes that are not tied to one program. If only one app misbehaves, repair or reinstall that app first.
Before you start
- Sign in with an administrator account. Both tools refuse to run from a standard account or a normal (non-elevated) window.
- Plug in a laptop and stay online. DISM downloads clean files from Windows Update, and a laptop that sleeps or dies halfway through only wastes time.
- Save open work. You will restart at the end, and the scans can slow the PC down while they run.
- Find your BitLocker recovery key if your drive is encrypted. You only need it for the recovery tools later in this guide, but Startup Repair and System Restore from the recovery screen both ask for it on encrypted PCs.
Neither SFC nor DISM touches your documents, photos or installed apps. They only compare and replace Windows’ own files.
Run DISM and then SFC
This is the repair that solves most cases. Microsoft says each tool can take several minutes; a slow hard drive or connection stretches that, so start when you can leave the PC alone for a while.

Open Command Prompt as an administrator
- Select Start and type cmd.
- In the results, right-click Command Prompt and choose Run as administrator.
- Select Yes in the User Account Control prompt. If Windows asks for a password, enter the administrator’s password.
- Check that the window’s title bar starts with Administrator. If it does not, close it and repeat the steps, because the commands fail without administrator rights.

You can also press Windows key + X and choose Terminal (Admin) (called Windows Terminal (Admin) in some versions of Windows 11). That opens a PowerShell tab instead of Command Prompt; the DISM and SFC commands below work the same way there.
Repair the Windows image with DISM
Type this command and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
DISM shows a progress bar with a percentage. It can sit on the same number for a while, so leave it alone until it reports that the restore operation completed. If it stops with an error instead, skip ahead to the section on DISM errors below.
If you only want to check without repairing, DISM /Online /Cleanup-Image /CheckHealth reports whether corruption has already been detected, and DISM /Online /Cleanup-Image /ScanHealth runs a full scan, which takes several minutes. Neither changes anything, so most people can go straight to /RestoreHealth.
Scan and repair files with SFC
In the same window, type this command and press Enter:
sfc /scannow
SFC shows a verification percentage while it works. Keep the window open until it reaches 100% and prints a message that starts with Windows Resource Protection. Closing the window early stops the scan.
Restart and test the problem
Restart the PC from Start > Power > Restart, even when SFC reports no problems, so Windows starts fresh with the repaired files loaded. Then try whatever was failing before. If it works, you are done.
What the SFC messages mean
SFC ends with one of four messages. Each one points to a different next step.
| SFC message | What it means | What to do next |
|---|---|---|
| Windows Resource Protection did not find any integrity violations. | No protected system file is damaged or missing. | The problem is somewhere else: a driver, an app, a recent update or the drive. |
| Windows Resource Protection found corrupt files and successfully repaired them. | Damaged files were replaced. | Restart and test. Check the log if you want the file names. |
| Windows Resource Protection found corrupt files but was unable to fix some of them. | Some files could not be replaced from the component store. | Run DISM again, restart, then run SFC again. See “Files SFC cannot fix” below. |
| Windows Resource Protection could not perform the requested operation. | SFC could not run its check at all. | Run SFC in Safe Mode, as described below. |

See which files SFC repaired
SFC writes its details to a long log file at %windir%\Logs\CBS\CBS.log. Microsoft gives a command that copies only the SFC lines to a short text file on your desktop. Run it in an administrator Command Prompt window, not PowerShell, because PowerShell does not expand the %userprofile% part:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
Open sfcdetails.txt on the desktop with Notepad. Each line starts with a date and time, and the file includes entries from every SFC run, so look at the latest time stamps. Lines that mention a repaired file confirm the fix; lines that say a file could not be repaired give you its exact name and folder.
When DISM stops with an error
DISM needs a working connection to Windows Update to fetch clean files. When it fails, work through these causes in order.
- Check the connection. Open a web page to confirm the PC is online, then run the DISM command again.
- Restart first. A pending update can block servicing. Restart, let any updates finish installing, and run DISM again.
- Look at Windows Update. If Windows Update itself is broken, DISM cannot download from it. Open Settings > Windows Update, select Check for updates, and note any error.
- Give DISM a local source. On a work or school PC, an administrator’s policy may point DISM somewhere other than Windows Update. In that case, or when Windows Update will not cooperate, use Windows 11 installation media as the repair source.
To use installation media, download the Windows 11 disc image (ISO) from Microsoft, right-click it and choose Mount, and note the drive letter it gets (D: in this example). Look in its sources folder. If it contains install.wim, run the command below. If it has install.esd instead, skip this and use the reinstall option further down, which needs no source file at all.
DISM /Online /Cleanup-Image /RestoreHealth /Source:Wim:D:\sources\install.wim:1 /LimitAccess

The :1 at the end is the index of the edition inside the file, and /LimitAccess stops DISM from trying Windows Update. Microsoft’s guidance on repair sources says the source should be at the same update level as your PC or newer, and should include the same language, so a freshly downloaded ISO of the same Windows 11 version is the best match. To see which index matches your edition (Home or Pro), run DISM /Get-WimInfo /WimFile:D:\sources\install.wim first and use that number.
Microsoft’s guide to repairing a Windows image with DISM describes the /CheckHealth, /ScanHealth, /RestoreHealth, /Source and /LimitAccess options in full.
When SFC could not perform the requested operation
This message means SFC could not finish its check, often because something on the running system is in the way. Microsoft’s two suggestions are:
- Run SFC in Safe Mode. Safe Mode loads Windows with a minimal set of drivers and startup programs. Starting Windows 11 in Safe Mode takes a trip through the recovery screens; once there, open an administrator Command Prompt and run
sfc /scannowagain. - Check two folders. Make sure the folders PendingDeletes and PendingRenames exist inside
%WinDir%\WinSxS\Temp. They are part of the component store and SFC needs them.
Files SFC cannot fix
When SFC keeps reporting files it could not repair, try this sequence once more before moving on: run the DISM command, restart, then run sfc /scannow again. A second pass often succeeds because DISM has refreshed the component store and files that were locked are free after the restart.
If the same file fails every time, Microsoft documents a manual route for experienced users: take ownership of the damaged file, grant administrators full access, and copy a known good version of the file over it from another PC running the exact same Windows 11 version. The details and commands are on Microsoft’s System File Checker page. For most people, the reinstall in the next section is safer and fixes every system file at once.
Reinstall Windows 11 and keep your apps and files
Windows 11 has a built-in repair that replaces all of Windows while keeping your apps, files and settings. It is the right step when SFC and DISM run cleanly but problems remain, or when SFC cannot fix some files.
- Open Settings and select System.
- Select Recovery.
- Under Fix problems using Windows Update, select Reinstall now.
- Choose whether the PC may restart on its own 15 minutes after the install finishes, then confirm.

Windows Update downloads a repair copy of the Windows version you already have and installs it. Keep the PC plugged in and online until it restarts. The option needs Windows 11 version 22H2 or later with recent updates, and it can be missing on PCs managed by a work or school. The full walkthrough, including the clean install route when this option is not available, is in the guide to reinstalling Windows 11 while keeping your apps and files.

If Windows 11 will not start
When the PC cannot reach the desktop, use the Windows Recovery Environment, the blue Choose an option screen. Windows opens it on its own after the PC fails to start several times. You can also reach it with Shift held while you select Power > Restart, or from a recovery drive. The guide to opening recovery mode in Windows 11 covers every route.
Run Startup Repair
- On the Choose an option screen, select Troubleshoot.
- Select Advanced options.
- Select Startup Repair, then Restart if asked.
- Enter your BitLocker recovery key if the PC asks for it.

Startup Repair looks for damaged system files, corrupted boot configuration data, incompatible drivers and registry errors that stop Windows from loading. If it cannot fix the problem, it shows a report of what it found.
Run SFC on the installed Windows from recovery
From Troubleshoot > Advanced options > Command Prompt, SFC can check a Windows installation that is not running. Drive letters often change in the recovery environment, so first type dir C:\ and dir D:\ to find the drive that holds the Windows folder. If it is D:, run:
sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows
/offbootdir and /offwindir are the SFC options for an offline repair, documented in Microsoft’s SFC command reference. Type exit and choose Continue when it finishes.
Roll back or reset as a last resort
If repairs do not help and the problem started recently, System Restore puts system files, settings and installed programs back to a restore point without touching personal files. Press Windows key + R, type rstrui.exe, and press Enter, or use Troubleshoot > Advanced options > System Restore from the recovery screen. The guide to restoring your computer to an earlier date explains how to pick a restore point and undo one.
When nothing else works, Reset this PC reinstalls Windows and lets you choose Keep my files or Remove everything. Either choice removes your installed apps, so back up first and note which apps you need to install again. Follow the guide to factory resetting a Windows 11 PC from Settings, or if you are already in an administrator window, start the reset with the systemreset command.
When corruption keeps coming back
System files rarely break on their own. If SFC finds damage again a few days after a repair, look for the cause.
- Check the drive. Run
chkdsk C: /scanin an administrator window for an online check of the file system. If it reports problems,chkdsk C: /ffixes them; because Windows is using drive C:, it asks to schedule the check for the next restart, so type Y and restart. On a large hard drive,/r(which also looks for bad sectors) can take hours. A drive that keeps producing errors may be failing, so back up your files right away. - Avoid forced shutdowns. Holding the power button during an update or while Windows is writing files is a common cause of damaged files.
- Install updates. Open Settings > Windows Update and install what is waiting, including any failed updates.
- Scan for malware. Run a full scan in Windows Security, since malicious software can replace or damage system files.
- Undo recent changes. A driver or system utility installed right before the trouble started is worth removing.
Questions About Repairing Windows 11 System Files
Will SFC or DISM delete my files or apps?
No. Both tools only check and replace Windows’ own system files and the component store. Your documents, photos and installed apps stay as they are. Only the last-resort options change more: System Restore removes apps and drivers installed after the restore point, and Reset this PC removes all installed apps.
Should I run SFC before or after DISM?
Microsoft’s current instructions run DISM first and SFC second. If you already ran SFC first and it could not fix some files, that is fine: run DISM, restart, and run SFC again.
Can I check for damage without changing anything?
Yes. sfc /verifyonly scans protected system files without repairing them, and DISM /Online /Cleanup-Image /CheckHealth reports whether the component store is healthy, repairable or not repairable. These are useful when you only want to know whether the files are the problem before you spend time on repairs.
Do I need to run these scans regularly?
No. There is no benefit to running SFC or DISM on a schedule when Windows is working normally. Windows already repairs itself during servicing and updates. Run them when something is wrong, after a crash during an update, or when Microsoft support or an error message suggests it.
Can I use the PC while the scans run?
Yes, but keep it light. Browsing or writing a document is fine; avoid installing software or updates during the scan, keep the window open, and do not shut down or restart until both tools have finished. Heavy work mainly makes the scans take longer.
Does SFC repair a damaged drive?
No. SFC replaces files, but it cannot fix the file system or a failing disk. That is what CHKDSK is for, and a drive with physical errors needs to be replaced. Microsoft’s CHKDSK command reference lists what each switch does.