
sfc and DISM ship with the operating system; run winver to see your exact build. The wording of the result lines differs between builds and interface languages — compare the text on your screen with the official documentation for your build.Access is denied.DISM /Online /Cleanup-Image /RestoreHealth, which fetches replacement files. sfc /scannow works offline because it reads the local component store.Pre-flight checklist:
Administrator:What to do: press Win + X and pick Terminal (Admin) on Windows 11 or Windows PowerShell (Admin) on Windows 10, then confirm the User Account Control prompt with Yes. On older builds, press Start, type cmd, right-click Command Prompt and choose Run as administrator.
Why: both repair tools modify protected system files. Started from a normal window, they can read but not repair, and you waste a full scan before seeing Access is denied.
How to check: run net session. An elevated window answers with an empty session list; a normal one returns error 5.
net session
Example of a correctly elevated window:
C:\Windows\system32>net session
There are no entries in the list.
Example of a window that is not elevated — stop here and reopen it as administrator:
System error 5 has occurred.
Access is denied.

What to do: type the command below and press Enter. Leave the window open and do not close it while the verification percentage is moving.
sfc /scannow
Why: SFC (System File Checker) is the Windows tool that checks every protected system file against its known-good copy and replaces damaged ones from the local component store. It is the first step because it repairs most corruption locally, without a network connection.
How to check: the last line of output tells you which branch you are on. Match it against this table.
| Line on screen | What it means | Next action |
|---|---|---|
| `Windows Resource Protection did not find any integrity violations.` | No damaged system files | Nothing to repair — go to Step 3 to confirm |
| `Windows Resource Protection found corrupt files and successfully repaired them.` | Files were replaced | Restart the PC, then re-check |
| `Windows Resource Protection found corrupt files but was unable to fix some of them.` | The source of the good copies is damaged | Go to Step 3 (DISM) |
| `Windows Resource Protection could not perform the requested operation.` | The scan was interrupted or blocked | See Troubleshooting |
If the scan repaired files, restart immediately so the replaced binaries are loaded:
shutdown /r /t 0
Example of the fully repaired branch on screen:
Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection found corrupt files and successfully repaired them.

What to do: run DISM, wait for it to finish, then repeat sfc /scannow and restart.
DISM /Online /Cleanup-Image /RestoreHealth
Why: DISM (Deployment Image Servicing and Management) rebuilds the system image — the component store — from which sfc takes its original files. That is why the two commands are used as a pair: sfc fixes the live system, DISM fixes the source sfc copies from. /Online targets the running installation and /RestoreHealth performs the repair; the command needs administrator rights and an internet connection.
How to check: the tool prints its progress and then a completion line. Example:
Deployment Image Servicing and Management tool
Version: <build shown by winver>
Image Version: <build shown by winver>
[==========================100.0%==========================]
The restore operation completed successfully.
The operation completed successfully.
Then rerun the checker and read the result again:
sfc /scannow
Success looks like either Windows Resource Protection did not find any integrity violations. or Windows Resource Protection found corrupt files and successfully repaired them. Restart the PC. The final confirmation is behavioural: the original symptom (random crashes, a broken Start menu, features that refuse to open) is gone after the restart. If the symptom survives a clean scan, the cause is outside the system-file layer — check the official documentation for the next diagnostic step rather than repeating the same command.
Problem. SFC finishes, finds damage, and admits it could not repair it.
Windows Resource Protection found corrupt files but was unable to fix some of them.sfc does not download anything — it copies from the local component store. If that store is damaged as well, there is no good copy to restore from.DISM /Online /Cleanup-Image /RestoreHealth from the elevated window with the network connected, then rerun sfc /scannow, then shutdown /r /t 0.Problem. The scan dies immediately instead of running.
Windows Resource Protection could not perform the requested operation.net session), and rerun sfc /scannow. If it fails the same way again, open C:\Windows\Logs\CBS\CBS.log and read the first error entry of the newest scan block; if the cause is not obvious there, check the documentation for your build.Problem. DISM stops with an error instead of repairing.
Error: 0x800f081f followed by The source files could not be found.ping -n 2 www.microsoft.com), disable the proxy for the session or allow the tool through the firewall, and rerun the DISM command. If the same error returns, check the official documentation for the /Source option, which points DISM at files from installation media instead of the network.Run sfc /scannow from an elevated prompt, reboot if it repaired files, and fall back to DISM /Online /Cleanup-Image /RestoreHealth plus a second sfc /scannow when it reports that it could not fix everything. If repairs or a reinstall disturb your licence, see Windows 11 activation lost: causes and how to restore your license, and for built-in AI features of the system see Windows with AI: Copilot and neural networks in the system.
Does sfc /scannow need an internet connection?
No. It compares protected system files against copies already stored on your drive. Only the DISM repair step downloads anything.
Which comes first, SFC or DISM?
Start with sfc /scannow. Only when it reports that it was unable to fix files do you run DISM /Online /Cleanup-Image /RestoreHealth, and after that you repeat sfc /scannow — that order is what makes the pair work.
Do I have to reboot after the scan?
Yes, if sfc repaired anything: the replaced files are loaded only after a restart. If it found no violations, no reboot is required for the scan itself.
Can I run these commands on Windows 10 as well as Windows 11?
Both tools are part of the standard Windows servicing stack and are invoked with the same syntax; the exact text of the result lines varies by build and language, so verify the wording against the documentation for your version.