Run DISM before sfc /scannow, not after. SFC repairs damaged Windows system files by copying clean versions out of the local component store, so if that store is itself damaged, SFC has nothing good to copy from and reports “Windows Resource Protection found corrupt files but was unable to fix some of them.” Open Terminal as Administrator, run DISM /Online /Cleanup-Image /RestoreHealth to repair the source first, then run sfc /scannow, then restart. Neither command fully applies until the machine reboots.
Applies to: Windows 10 (22H2) and Windows 11 (23H2, 24H2, 25H2) | Last updated: August 7, 2026
Key Takeaways
- The correct order is DISM, then SFC, then restart. Almost everyone runs them the other way around, which is why SFC so often reports files it could not repair.
- SFC pulls its replacement files from the component store. DISM is what repairs the component store itself, so DISM has to go first or SFC is copying from a damaged source.
- “Windows Resource Protection found corrupt files but was unable to fix some of them” is the tell-tale message. It usually means the component store was damaged, not that your Windows install is beyond saving.
- DISM sitting at 20 percent for a long time is normal. Leave it alone. If you think it is stuck, press Enter a few times inside the window and it will continue.
- You can chain the whole sequence in PowerShell with semicolons and walk away — DISM, SFC and a timed restart in a single command.
Quick Steps
- Right-click the Start button and choose Terminal (Admin) or Windows PowerShell (Admin).
- Run
DISM /Online /Cleanup-Image /RestoreHealthand wait for it to finish. - Run
sfc /scannowand wait for it to reach 100 percent. - Restart the computer — neither repair fully applies until you do.
- To run the whole thing unattended, use the single chained command below instead of steps 2 to 4.
What SFC and DISM Actually Do
SFC is the System File Checker. Running sfc /scannow makes it walk through your protected Windows system files, find the ones that are corrupt, and replace them with known-good copies. It is the command most people reach for when Windows starts crashing, apps stop opening, or something in the system just feels broken.
sfc /scannow
DISM stands for Deployment Image Servicing and Management, and the command that matters here repairs the Windows component store. The component store is the local set of clean files that Windows keeps around specifically so it can repair itself.
DISM /Online /Cleanup-Image /RestoreHealth
Both commands are built into Windows, both are free, and between them they fix a genuinely surprising share of the “my PC is acting strange” problems that used to walk into my repair shop. The catch is the order.
Why the Order Matters: DISM First, Then SFC
SFC does not download replacement files from the internet. It pulls them out of the local component store on your own machine. That single fact is the whole reason the order matters — if the component store is damaged, SFC has no clean source to copy from, so it identifies the broken files and then cannot do anything about them.
That is exactly when you get the message people get stuck on:
Windows Resource Protection found corrupt files but was unable to fix some of them.
People read that as “my Windows install is beyond repair” and start planning a reinstall. Usually it means something much more ordinary: the repair source was damaged too. Run DISM first to repair the component store, and then run SFC so it has a healthy source to copy from. DISM, then SFC — not the other way around.
How to Run DISM and SFC in Windows 11
Step 1: Open Terminal as Administrator
Right-click the Start button and select Terminal (Admin) on Windows 11, or Windows PowerShell (Admin) on Windows 10. Both commands need administrator rights — run them in a normal window and they will refuse straight away.
Step 2: Run DISM to repair the component store
DISM /Online /Cleanup-Image /RestoreHealth
This checks the component store against Windows Update and repairs what it finds damaged. Give it time — on a healthy machine it takes a few minutes, and on a badly corrupted one it can run considerably longer.
Note: DISM often sits at around 20 percent for a long stretch. That is completely normal and it is not frozen. If you are convinced it has hung, click inside the window and press Enter a few times — the console buffer sometimes pauses the display rather than the process, and it will carry on.
Step 3: Run SFC against the now-healthy source
sfc /scannow
With the component store repaired, SFC now has clean copies to work from. Let it run to 100 percent. If it reports that it found corrupt files and successfully repaired them, that is the outcome you want.
Step 4: Restart
Restart the computer when both commands have finished. Neither repair is fully applied until the machine reboots, and skipping this is why people occasionally run the whole sequence and swear nothing changed.
Run the Whole Repair in One Command
There is no reason to sit and babysit two long-running commands. In PowerShell you can chain the whole sequence with semicolons so DISM, SFC and the restart run back to back, unattended:
DISM /Online /Cleanup-Image /RestoreHealth; sfc /scannow; shutdown /r /t 30
The shutdown /r /t 30 on the end gives you a 30-second warning before it reboots, which is enough time to cancel if you have wandered back to the machine and want to read the output. Set the timer to 0 instead and it restarts the instant the commands are done.
Back when I was fixing PCs for clients, this saved me a genuinely useful amount of time. I would kick the sequence off in the morning, go out on a call-out, and come back to a machine that had repaired itself and rebooted — instead of one sitting there at a command prompt waiting for me to type the next line. If you like this kind of thing, there are more of them in my roundup of PowerShell commands every Windows user should know.
What to Do If SFC Still Cannot Fix Everything
If you have run DISM first and SFC still reports files it could not repair, the damage is deeper than the component store. Work through these in order.
- Run the pair a second time. On a badly damaged install, a second pass sometimes clears what the first could not, because the first run repaired the source it needed.
- Check that Windows Update is working. DISM pulls its clean files through Windows Update by default, so a broken update stack takes DISM down with it. My guide on clearing the Windows update cache covers resetting that.
- Check the drive itself. Persistent file corruption on a machine that keeps re-breaking is often a failing disk rather than a software problem. Test it with the steps in how to test hard drive and SSD health.
- If you are also getting crashes, system file corruption is one of several possible causes. My full blue screen of death troubleshooting guide walks through the rest in order of likelihood.
- As a last resort, reinstall over the top. An in-place reinstall replaces the Windows files while keeping your personal data — see how to reinstall Windows without losing data.
Frequently Asked Questions
Should I run DISM or SFC first?
Run DISM first. DISM repairs the component store, which is the source SFC copies its replacement files from. Running SFC first on a machine with a damaged component store is what produces the “unable to fix some of them” message.
Is DISM stuck at 20 percent?
Almost certainly not. DISM commonly pauses at around 20 percent for several minutes while it works through the component store. Leave it running. If the display looks frozen, click in the window and press Enter a few times — that usually unsticks the console output rather than the process.
Can DISM or SFC delete my personal files?
No. Both commands only touch protected Windows system files and the component store. Your documents, photos, installed programs and settings are not affected by either one.
Do these commands work on Windows 10?
Yes. Both DISM /Online /Cleanup-Image /RestoreHealth and sfc /scannow work identically on Windows 10 and Windows 11, and the DISM-then-SFC order applies the same way on both.
Do I really have to restart afterwards?
Yes. Some repaired files are locked while Windows is running and are only swapped in during boot. If you skip the restart, the repair may look like it did nothing.
