How to Repair Corrupted Windows Files with SFC and DISM

Logeshwaran

Every tutorial from the last decade — including the 2016 version of this very page — teaches the same first move for corrupted Windows files: open a command prompt and run sfc /scannow. Here is the part almost nobody says out loud: that order is backwards. SFC repairs your system files by copying fresh ones out of a backup vault that Windows keeps on your own disk — and if the vault itself is damaged, SFC either gives up or "repairs" your files from bad copies. Microsoft's own guidance for Windows 11 and 10 is to repair the vault first with one DISM command, then run SFC. Two commands, correct order, about half an hour of unattended waiting — that is the whole professional repair, and it is free.

⚡ Quick Answer

• Right-click the Start buttonTerminal (Admin) on Windows 11 (on Windows 10: search cmdRun as administrator).

First: DISM /Online /Cleanup-Image /RestoreHealth — wait it out, even when the percentage freezes.

Then: sfc /scannow — and restart when it finishes.

That exact sequence — vault first, files second — is the repair. The rest of this page decodes every message the two commands can answer with.

Jake met this one as a second opinion. A customer walked in carrying a desktop and a diagnosis from another shop: Settings kept crashing, Windows Update sat broken, apps closed themselves — "Windows is corrupted, needs a clean reinstall, $80 plus your time setting everything up again." Jake asked for one hour. He ran the two commands in this guide — DISM first, coffee, then SFC — and watched the second one report found corrupt files and successfully repaired them. Everything the customer owned stayed exactly where it was. The part that stuck with her was not the $80 she kept; it was Jake showing her the whole repair had been two lines of typing. The part that should stick with you: the other shop's diagnosis was correct. Windows really was corrupted. A reinstall really would have fixed it — the way demolishing a house fixes a squeaky door.

Ethan: "Think of a print shop with a master negative for every poster on the wall. A poster gets torn — no drama, the clerk prints a fresh copy from the master. That clerk is SFC. But if the master negative is scratched, the clerk cheerfully prints you a fresh copy of the scratch. DISM is the one who inspects the negatives and orders clean masters from the publisher. Now tell me: who has to do their job first?"

Getting "Windows Resource Protection could not start the repair service" instead of a scan? That is a different fault, and it is not damage — the repair service is refusing to start. Two commands fix it here, then come back and run this ladder.

What a "corrupted system file" actually is

Windows is tens of thousands of files that expect each other to be exactly right. A system file is "corrupted" when the copy on disk no longer matches what it should be — a few flipped bits from a power cut mid-write, an update interrupted at the wrong second, a failing disk quietly mangling what it stores, or software that overwrote something it had no business touching. The file is still there; it is just wrong, and every part of Windows that depends on it starts misbehaving in ways that look unrelated: Settings pages that close instantly, updates that fail with cryptic codes, a Start menu that stops opening, blue screens with no obvious cause.

Two reassurances before anything else. First, none of this involves your personal files — SFC and DISM read and repair Windows' own files and never touch documents, photos, or installed programs' data. Second, corruption is not an infection and not your fault; it is wear-and-tear that every Windows machine accumulates eventually, which is exactly why Microsoft ships the repair tools with the operating system.

The 2016 version of this page explained it with an example that still holds: delete or damage one important file in System32, and the process that depends on it fails, then the process that depended on that one fails, and the instability cascades. What has changed since 2016 is where the cure comes from — and that is the part worth understanding before you type anything.

Why the famous order is backwards

SFC — the System File Checker — compares every protected system file against a known-good copy and replaces the ones that fail the check. Old tutorials said those good copies lived in a compressed dllcache folder; modern Windows keeps them in the component store, the large WinSxS folder inside the Windows directory. That store is SFC's entire supply of spare parts.

Which exposes the flaw in the classic advice. The component store is made of files too, sitting on the same disk that just demonstrated it can corrupt things. When the store itself is damaged, SFC hits one of two walls: it reports found corrupt files but was unable to fix some of them — the mechanic opened the parts cabinet and found it empty — or, quieter and worse, it keeps "finding and repairing" the same corruption run after run, because it is faithfully restoring files from a damaged master. DISM's /RestoreHealth repairs the component store itself, pulling clean replacement pieces from Windows Update. That is why Microsoft's guidance for Windows 11 and 10 puts DISM first: fix the parts supply, then send in the mechanic. Run it in the old order on a healthy store and you lose nothing — but on the machines that actually need this page, the old order is precisely what fails.

The repair, step by step

  1. Open a terminal as administrator. On Windows 11, right-click the Start button and choose Terminal (Admin). On Windows 10, type cmd in the search box and click Run as administrator — our run CMD as administrator guide shows every route in. The admin part is not optional: without it, both commands refuse to work.
  2. Repair the vault first. Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter. Stay connected to the internet — this is the step that downloads clean replacement pieces from Windows Update. Expect 10 to 30 minutes, sometimes longer.
  3. Do not rescue it from a frozen percentage. DISM is infamous for sitting motionless at one number — often somewhere in the 60s — for many minutes while working hard underneath. The 2016 version of this page said the same about the 20 percent mark, and it is still true: a stuck-looking percentage is normal. Leave it alone until it prints "The operation completed successfully."
  4. Now run the file checker. Type sfc /scannow and press Enter. It walks every protected system file — usually 5 to 20 minutes — and repairs what it finds using the store you just fixed.
  5. Restart, then judge. Reboot the PC and check whether the original misbehavior — the crashing Settings page, the failing update — is gone. If SFC reported repairs, one more sfc /scannow after the restart confirming no integrity violations is the clean bill of health.

Reading SFC's four verdicts

SFC always ends with one of four sentences, and each one means something specific:

SFC saysIt meansYour move
"...did not find any integrity violations"System files are clean — your problem lives elsewhereStop repairing files; suspect drivers, disk, or a specific app
"...found corrupt files and successfully repaired them"The good ending — damage found, damage fixedRestart, re-run SFC once to confirm clean
"...found corrupt files but was unable to fix some of them"The parts cabinet is bare — the component store needs repairRun the DISM step (you skipped it, didn't you?), then SFC again
"...could not perform the requested operation"SFC itself cannot run properlySee the section below — admin rights, its service, or Safe Mode

When SFC reports repairs and you want the receipts, it logs every replaced file. Type findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfc-results.txt" in the same admin window and a readable summary lands on your desktop — the exact list a good technician would show you to justify the bill you no longer owe.

The trap: "repaired" every run, corrupted again tomorrow

This is the pattern that brings people back to this page angry: SFC announces found corrupt files and successfully repaired them, you feel the win, you run it again next week — same message. Same "repair," forever. A repair that has to repeat was never a repair, and it has two usual causes. The first is the one this whole page is built around: a damaged component store feeding SFC bad spare parts, which the DISM step cures. The second is more serious — something is actively creating new corruption, and the leading suspects are a failing disk or bad RAM. Corruption that returns after a correct DISM-then-SFC pass has stopped being a software story; check the disk's health before it escalates from mangling Windows files, which are replaceable, to mangling your files, which are not.

When DISM itself fails: 0x800f081f and the offline source

DISM's repair step downloads clean files from Windows Update — so on a machine whose corruption has broken Windows Update itself, or with no internet, it can end with error 0x800f081f: the source files could not be found. The cure is handing DISM its own supply of clean parts: a Windows installation file.

  1. Download the official ISO for your Windows version — our Windows 10 & 11 ISO download guide covers the legitimate free sources, and doing this from any working PC is fine.
  2. Double-click the ISO to mount it and note the drive letter Windows assigns (say E:). Look inside its sources folder for install.wim or install.esd.
  3. Run DISM /Online /Cleanup-Image /RestoreHealth /Source:esd:E:\sources\install.esd:1 /LimitAccess — swap esd for wim to match the file you found. The :1 picks the first Windows edition stored inside; if DISM still complains about sources, your edition may sit at another index, and matching the ISO's edition and language to the installed system is what makes this work.
  4. When it completes, return to sfc /scannow as usual.

"Could not perform the requested operation" and its cousins

Sometimes the repair tool is the thing that breaks. If SFC quits with could not perform the requested operation or complains that it could not start the repair service, work through three suspects in order. First, the window itself: both commands demand a genuinely elevated terminal — the one from right-clicking Start → Terminal (Admin), not a plain one. Second, the service SFC rides on: press Win + R, run services.msc, find Windows Modules Installer, and make sure it is not disabled — overeager "Windows optimization" tools love switching it off, and SFC cannot start without it. Third, interference from everything else: boot into Safe Mode and run the command there, where only the essentials are loaded. Those three moves resolve the overwhelming majority of cases; the stubborn remainder usually traces back to the same disk-health question raised in the recurring-corruption section.

What these commands will never fix

SFC and DISM get prescribed on forums for everything short of a broken screen hinge, so here is the honest boundary. They repair Windows' own files — nothing else. They will not recover your corrupted documents or photos; they will not make a slow PC faster, because slowness is almost never a corrupted-system-file symptom; they will not fix a misbehaving program you installed, which owns its own files; and they cannot cure failing hardware — on a dying disk they are painting a house that is on fire. They are the right tool when Windows itself misbehaves: built-in apps crashing, updates failing, Explorer glitching, unexplained blue screens. If a repair-shop diagnosis ever again reads "corrupted Windows, needs a reinstall," you now hold the middle option nobody mentions — and if the two commands genuinely cannot save the installation, the true last resort before a clean install is an in-place repair upgrade: run Setup from that same mounted ISO and choose to keep files and apps, and Windows rebuilds itself around everything you own.

SFC, DISM, CHKDSK — which tool for which damage

Three repair commands get mixed up constantly, and they operate on three different layers. CHKDSK checks the disk and filesystem — the shelving. DISM repairs the component store — the warehouse of spare parts. SFC repairs the working system files — the parts in use. Corrupted files with a healthy disk: DISM then SFC, exactly as above. Bad sectors, a drive that clicks or drops offline, files corrupting faster than you fix them: chkdsk C: /f at the layer below — and a hardware-health question at the layer below that. When in doubt, this page's order first; it is the more common case and the safer one.

The whole repair on one screen

StepCommandWhat it repairsTime
1Terminal (Admin)Nothing — but nothing below works without it10 seconds
2DISM /Online /Cleanup-Image /RestoreHealthThe component store (SFC's parts supply)10–30+ min
3sfc /scannowThe system files in use5–20 min
4Restart, sfc /scannow againConfirms the clean bill of health5–20 min
If 2 fails/Source: a mounted ISO + /LimitAccessGives DISM offline spare parts+20 min

One note for the Windows 10 holdouts: every command on this page works identically there — only the door differs (search cmd, Run as administrator). Windows 10's regular support ended October 14, 2025, and machines enrolled in consumer ESU keep receiving security fixes into 2027 — but security patches do not repair corruption, so this page matters more on an aging Windows 10 install, not less.

FAQ — SFC and DISM in Windows 11 and 10

Should I run SFC or DISM first?

DISM first, then SFC. DISM repairs the component store that SFC uses as its source of clean files — run SFC against a damaged store and it either fails or repairs from bad copies. On a healthy system the order costs you nothing; on a damaged one it is everything.

Will sfc /scannow delete my files or programs?

No. It reads and repairs Windows' own protected files only. Documents, photos, and installed programs are untouched — that is what separates this repair from the reinstall it replaces.

How long does sfc /scannow take?

Usually 5 to 20 minutes depending on disk speed. It prints progress as it goes. DISM's RestoreHealth step is the longer of the two — plan for half an hour of not needing the PC.

DISM is stuck at the same percentage. Is it frozen?

Almost certainly not. Long motionless pauses at a fixed number — often somewhere in the 60s — are normal while it works underneath. Interrupting it is the only wrong move. Wait for "The operation completed successfully."

Do I need internet for this repair?

For the DISM step, ideally yes — it downloads clean files from Windows Update. Without internet (or when that fails with 0x800f081f), point DISM at a mounted Windows ISO with the /Source switch as shown above. SFC itself needs no internet.

SFC says it found and repaired corrupt files. Am I done?

Restart and run it once more. A clean "no integrity violations" on the second pass is the finish line. If it finds new repairs every run, read the recurring-corruption section — something deeper is going on.

SFC found corrupt files but was "unable to fix some of them." Now what?

That is the signature of a damaged component store — SFC reached into the parts cabinet and came up empty. Run the DISM RestoreHealth step, then run SFC again. This exact sequence is why the order matters.

What does "Windows Resource Protection could not perform the requested operation" mean?

SFC itself could not run properly. Check you are in a genuinely elevated terminal, make sure the Windows Modules Installer service is not disabled, and try the command from Safe Mode. The dedicated section above walks all three.

Can I run these commands in PowerShell instead of Command Prompt?

Yes. Both are ordinary programs and run identically in Command Prompt, PowerShell, or Windows Terminal — what matters is the "Administrator" in the title bar, not the shell flavor.

What is the component store (WinSxS) — and can I delete it to save space?

It is the vault of known-good Windows files that SFC repairs from and updates build on — and no, do not delete it or trust tools that promise to. A gutted component store is how a fixable PC becomes an unfixable one.

Does this fix a slow computer?

Usually no. Slowness is nearly always startup load, disk health, or thermal throttling — not corrupted system files. Run the repair to rule corruption out, but do not expect a speed miracle from it.

Will this fix Windows Update errors?

Often, yes — failed updates are a classic corruption symptom, and update code 0x800f081f in particular points at the component store DISM repairs. Run the pair in order, restart, then retry the update.

Is sfc /scannow safe to run on a healthy PC?

Completely. On a clean system it scans, finds nothing, and reports no integrity violations — a free health check. Running it out of curiosity right now is a fine way to see what "all clear" looks like.

How is CHKDSK different from SFC?

CHKDSK repairs the disk and filesystem — the layer files sit on. SFC repairs the Windows files themselves. Corrupted system files: this page's order. A drive with bad sectors or files that re-corrupt: chkdsk C: /f, and a hard look at the disk's health.

Where do I see exactly what SFC repaired?

In CBS.log. The findstr one-liner in the verdicts section filters just the repair entries to a text file on your desktop — the receipts, file by file.

Nothing worked. Do I have to reinstall Windows?

Not yet. The in-place repair upgrade — running Setup from a mounted ISO and keeping files and apps — rebuilds Windows around everything you own, and it is the honest last step before a true clean install. If even that will not hold, test the disk and RAM first: installs do not fix failing hardware.

Revision note. Originally published February 9, 2016 as a five-step SFC guide — and to its credit, the 2016 version already taught DISM as the rescue move when SFC failed, years before that pairing became the official advice. Rewritten August 21, 2026 for Windows 11 and Windows 10 with the order corrected, all four SFC verdicts decoded, the offline-source repair for 0x800f081f, and the honest section on what these commands cannot do. If your PC is misbehaving tonight and someone has already said the word "reinstall," take the half hour first — two commands, in the right order, cost you nothing but the coffee you drink while they run. Spotted an error or a case I missed? Tell me through the contact page and I will fix it.

Related