domingo, setembro 27, 2026
Increva-se
Inicio English SFC and DISM: the 2 Commands That Fix Windows Before You Even Think About Reinstalling

SFC and DISM: the 2 Commands That Fix Windows Before You Even Think About Reinstalling

Step-by-step guide to repairing corrupted Windows 10 and 11 system files with DISM and SFC — in the right order, reading each result and knowing what to do when the repair fails.

por tecnologiaxt
Windows Repair ⏱ 11 min read 📅 September 2026

SFC and DISM: the 2 Commands That Fix Windows Before You Even Think About Reinstalling

Step-by-step guide to repairing corrupted Windows 10 and 11 system files with DISM and SFC — in the right order, reading each result and knowing what to do when the repair fails.

RC
Blue screens, a Start menu that won’t open, an update that always fails at the same point… Before you wipe everything and reinstall, Windows gives you two built-in commands to repair itself. I’m Ronaldo Cardoso from Tecnologia Moderna, and today we’ll run that repair together, in the right order.
Quick summary

The full repair, in order:

  • Open the terminal as administrator (Win + X → Terminal (Admin)).
  • 1st DISM: DISM /Online /Cleanup-Image /RestoreHealth — fixes the “source” Windows uses to repair itself.
  • 2nd SFC: sfc /scannow — checks and replaces corrupted system files.
  • Restart and check whether the problem is gone.
  • If DISM fails, you can use an official Windows image as the repair source — without reinstalling anything.
Before you reinstall

🔧 Why Try SFC and DISM Before Reinstalling Windows

A clean install fixes a lot, but it comes at a price: hours reinstalling programs, redoing every setting and, if your backup isn’t up to date, lost files. Many of the problems that push people to reinstall, however, come from corrupted system files — caused by a power cut during an update, a forced shutdown, a drive with bad sectors or a program that overwrote something it shouldn’t have.

For these cases, Windows 10 and 11 ship with two repair tools that work together: DISM, which repairs the “reserve” of original system files, and SFC, which compares the files in use against that reserve and replaces anything that’s damaged. Neither of them touches your documents, photos or programs.

In this step-by-step guide you’ll run both in the recommended order, understand every message they show and learn what to do if the repair doesn’t work. In my post about 10 commands to speed up Windows I mentioned SFC briefly; this is the complete guide.

Person in front of a laptop showing an error
In short: DISM first (fixes the source), then SFC (fixes the files), then restart. It takes 20 to 40 minutes in total and deletes nothing of yours.
Symptoms

🩺 When These Commands Help (and When They Don’t)

SymptomDo SFC + DISM help?
Start menu, taskbar or Settings won’t open✅ Often
Windows Update always fails with the same error✅ Often
Random blue screens after a power outage✅ Worth trying
Built-in Windows apps closing on their own✅ Worth trying
Slow PC because of low memory or too many programs❌ Not a file corruption issue
Active virus❌ Remove the threat first, then run the repair
Physically failing HDD/SSD❌ The problem is the hardware

If you suspect the drive, check its health first with the 4 commands that reveal your PC’s real health — repairing files on a dying drive is a losing battle.

Step 1

🛡️ Opening the Terminal as Administrator

  1. Press Win + X (or right-click the Start button).
  2. Choose Terminal (Admin) on Windows 11 or Windows PowerShell (Admin) on Windows 10.
  3. Click Yes on the User Account Control prompt.

Without administrator rights, both commands stop right at the start with a warning. Before you begin, close open programs, plug your laptop into the charger and make sure the internet is working — DISM downloads original files through Windows Update.

Don’t turn off the PC while the commands are running. If it looks frozen, wait: DISM sitting at 20% or 62.3% for several minutes is normal.
Step 2 — DISM first

🧰 DISM: Fixing Windows’ Repair Source

DISM (Deployment Image Servicing and Management) takes care of the Windows image, the reserve of original files that SFC uses as its reference. If that reserve is damaged, SFC has nowhere to get good copies from — that’s why Microsoft recommends running DISM first. DISM has three levels:

CommandWhat it doesTime
DISM /Online /Cleanup-Image /CheckHealth Only checks whether corruption has already been flaggedSeconds
DISM /Online /Cleanup-Image /ScanHealth Runs a full scan without fixing anything5 to 15 min
DISM /Online /Cleanup-Image /RestoreHealth Scans and repairs, downloading original files from Windows Update10 to 30 min

In practice, you can go straight to the one that fixes things:

Terminal (Admin)
DISM /Online /Cleanup-Image /RestoreHealth
Windows Terminal running repair commands
Message at the endMeaning
“The restore operation completed successfully.”Repair source fixed (or it was already fine) — move on to SFC
“The source files could not be found.”Windows Update couldn’t provide the files — use Step 6 (official image)
Error 0x800f081f or 0x800f0906Same as above: no repair source available
Step 3 — then SFC

🔍 SFC /scannow: Checking and Replacing Corrupted Files

With the repair source in order, run the System File Checker:

FieldDetail
Commandsfc /scannow
Time5 to 20 minutes
Needs admin?Yes

SFC goes through every protected Windows file, compares it with the original version and automatically replaces the ones that don’t match. At the end, it shows one of these messages:

MessageWhat to do
“Windows Resource Protection did not find any integrity violations.”System files are fine — the problem is somewhere else
“Windows Resource Protection found corrupt files and successfully repaired them.”Restart and test — very often the problem ends here
“Windows Resource Protection found corrupt files but was unable to fix some of them.”Run DISM again, then SFC once more; if it persists, see Steps 5 and 6
“Windows Resource Protection could not perform the requested operation.”Run SFC in Safe Mode or outside Windows (Step 7)
Progress bar on a computer screen
Quick recap

🔁 The Complete Sequence, Ready to Copy

If you’d rather let everything run in one go, paste the block below into the terminal as administrator and go grab a coffee:

Terminal (Admin) — full repair
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

When both finish, restart the computer. Some repairs are only applied during the restart. If SFC fixed something, it’s worth running sfc /scannow a second time after restarting, to confirm it ends with “did not find any integrity violations”.

Tip: take a photo of the final message of each command. If you need help later (including in the comments here on the blog), that information saves a lot of time.
Step 5 — for the curious

📄 Reading the SFC Report (CBS.log)

Everything SFC does is recorded in C:\Windows\Logs\CBS\CBS.log, a huge file that’s hard to read. This command extracts only the SFC lines and saves a text file to your desktop:

Command Prompt (Admin)
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log > "%userprofile%\Desktop\sfc-details.txt"

Open sfc-details.txt and look for “Cannot repair”: that’s where the name of each problematic file appears. This helps you search for the specific problem or show it to a technician.

This command uses classic Command Prompt syntax. In PowerShell, use Select-String -Path $env:windir\Logs\CBS\CBS.log -Pattern '\[SR\]' | Out-File $env:USERPROFILE\Desktop\sfc-details.txt.
Step 6 — when DISM fails

💿 Using the Official Windows Image as the Repair Source

If DISM complains that it couldn’t find the source files, you can hand it a clean copy of Windows — without installing anything on top:

  1. Download the official ISO image of the same Windows version you have (10 or 11) from Microsoft’s website.
  2. Double-click the ISO file: Windows mounts it as if it were a DVD, with its own drive letter (for example, E:).
  3. Find the index of your edition (Home, Pro…) with the command below, replacing E: with the letter that appeared.
Terminal (Admin) — list editions in the image
DISM /Get-WimInfo /WimFile:E:\sources\install.wim

If the file is called install.esd instead of install.wim, change the name in the command. Write down the Index number of your edition and run the repair using the image:

Terminal (Admin) — repair using the official image (e.g. index 6)
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:E:\sources\install.wim:6 /LimitAccess
USB drive plugged into a laptop to be used as a repair source

With install.esd, that part becomes /Source:ESD:E:\sources\install.esd:6. Then run sfc /scannow again.

Step 7 — Windows won’t start

🚑 What If Windows Won’t Even Boot?

If Windows never reaches the desktop, you can run SFC from the Windows Recovery Environment:

  1. Force the PC off 3 times while it’s loading — on the third boot, Windows opens Automatic Repair (or boot from an installation USB drive and choose Repair your computer).
  2. Go to Advanced options → Troubleshoot → Advanced options → Command Prompt.
  3. Find the Windows drive letter (in this environment it isn’t always C:) with dir C:\Windows, dir D:\Windows…
  4. Run SFC pointing to the installation:
Recovery Command Prompt (change C: if needed)
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

If the drive is the problem, my guide CHKDSK: when to use it and when to avoid it explains how to handle it safely. And if blue screens are the main symptom, see how to read the blue screen error code.

Bonus

🧹 Bonus: Freeing Up Space with DISM

The same DISM tool has a cleanup function: it removes old versions of components that are kept around after updates.

CommandWhat it does
DISM /Online /Cleanup-Image /AnalyzeComponentStore Shows how much space the component store uses and whether a cleanup is recommended
DISM /Online /Cleanup-Image /StartComponentCleanup Removes old versions that are no longer needed

After the cleanup, some older updates can no longer be uninstalled — so only do it once the system has been stable for a few days. For other ways to free up space, see how to free up space on your computer.

If a command fails

🔁 Alternatives Table

If this fails…AlternativeNote
DISM /Online /Cleanup-Image /RestoreHealth Repair-WindowsImage -Online -RestoreHealth Same repair through PowerShell (Admin)
DISM /Online /Cleanup-Image /ScanHealth Repair-WindowsImage -Online -ScanHealth Scan through PowerShell
DISM stuck at 20% or 62.3%Wait up to 30 minutesIt’s common; interrupting can make things worse
“You must be an administrator”Open Terminal (Admin)Without elevation, the commands won’t run
DISM can’t reach Windows UpdateUse the official ISO (Step 6)Works offline
SFC won’t run inside WindowsRun it from Recovery (Step 7)Use /offbootdir and /offwindir
When nothing works

🧭 Before Reinstalling: the Last Resorts

If SFC and DISM didn’t solve it, there are still options before wiping everything:

  1. System Restore to a point before the problem started — I explain it in how to restore Windows without losing files.
  2. Reinstall through Windows Update: on Windows 11, go to Settings → System → Recovery → Fix problems using Windows Update, which reinstalls the system while keeping your files and programs.
  3. Reset this PC keeping your personal files (programs will need to be reinstalled).

And before any of these, make a backup — the step-by-step is in full Windows backup.

Frequently Asked Questions

FAQ

Do SFC and DISM delete my files?

No. They only check and replace operating system files. Documents, photos and programs are not affected.

Which should I run first, SFC or DISM?

On Windows 10 and 11, the recommendation is to run DISM with RestoreHealth first and then sfc /scannow, because SFC relies on the image that DISM repairs.

DISM is stuck at 20%. What now?

Wait. It’s common for it to sit for several minutes at 20% or 62.3%. Only consider stopping it after more than an hour with no change at all.

Do I need internet for DISM?

For the standard RestoreHealth, yes, because it downloads files from Windows Update. Without internet, use an official ISO as the repair source.

SFC says it was unable to fix some files. What should I do?

Run DISM with RestoreHealth, restart and run SFC again. If it continues, use the official ISO as the source or run SFC from the recovery environment.

Can I run these commands often?

There’s no harm, but there’s also no benefit in running them without a reason. Use them when there are signs of corrupted files.

Does it work on Windows 10?

Yes. SFC and DISM work on Windows 10 and Windows 11 with the same commands.

How long does the full repair take?

Usually 20 to 40 minutes for both commands combined, depending on the computer and the internet connection.

Test your knowledge

🎮 How much did you learn?

Once you pick an answer it locks in — reload the page to try again.

1. Which command should run first on Windows 10/11?

2. What does SFC do?

3. What should you do if DISM can’t find the source files?

4. Where is SFC’s detailed log stored?

5. Do SFC and DISM delete your documents?

Compartilhar

Esse conteúdo ajudou você?

Compartilha com alguém que também vai curtir — é rapidinho e ajuda muito o nosso trabalho a chegar em mais gente.

WhatsApp Facebook Telegram X

O Instagram não tem um botão de compartilhar direto pelo navegador — copie o link acima e cole numa Story ou no direct. 😉

Siga a Gente

Não perca nenhuma dica

Conteúdo novo toda semana — direto, técnico e sem enrolação.

Conhecimento só tem valor quando compartilhado.

Manter essa estrutura de laboratórios funcionando e produzir conteúdos de engenharia de forma totalmente gratuita e acessível exige tempo e dedicação diária à bancada. Esse guia salvou os seus arquivos? Você pode contribuir diretamente para manter o nosso trabalho independente forte. Apoie doando qualquer valor!

Quer apoiar a nossa bancada independente?

Tecnologia Moderna © 2026 — Conteúdo escrito por Ronaldo Cardoso. Todas as informações técnicas foram revisadas antes da publicação.

Bloqueador de Janelas Detectado

Seu antivírus ou bloqueador de pop-up pode estar bloqueando o nosso conteúdo!

Fique Por Dentro de todas as Novidades

Canal com propósito de Compartilhar, Ajudar e Ampliar conhecimento de todos!

📬

Ronaldo aqui: E aí, para não perder nenhum conteúdo, se inscreva aqui que eu aviso você em primeira mão!

Nos Envie a Sua Dúvida para que possamos criar um conteúdo exclusivo para você, com base na sua dúvida! juntos podemos ensinar outras pessoas!

@2024 – Todos os Direitos Reservado. Desenhado e Desenvolvido por:  Grupo Interativa Marketing  & Technology Center Interativa Marketing