The three repair commands: SFC, DISM and CHKDSK
Three built-in commands repair most damage to Windows files and disks. They are safe to run and do not touch your documents.
Open a command window as administrator
Right-click the Start button and choose Terminal (Admin) on Windows 11, or Windows PowerShell (Admin) or Command Prompt (Admin) on Windows 10. Click Yes when asked. Type or paste each command and press Enter. Wait for one to finish before starting the next.
The order to use
- DISM: repairs the store of spare system files that sfc draws on.
- SFC: checks every protected Windows file and replaces damaged ones from that store.
- CHKDSK: checks the disk's file system and surface.
Run all three, in this order, when Windows crashes, behaves strangely or cannot update.
1. DISM
DISM /Online /Cleanup-Image /RestoreHealth
It needs an internet connection, since it fetches clean files through Windows Update. It often seems stuck at 20 or 62 per cent for several minutes; that is normal. Allow 10 to 30 minutes.
- "The restore operation completed successfully": go on to sfc.
- Error 0x800f081f, "The source files could not be found": Windows Update itself is broken or offline. Check the connection and see Windows Update stuck.
Two lighter versions only examine: /CheckHealth (seconds) and /ScanHealth (a few minutes).
2. SFC (System File Checker)
sfc /scannow
Takes 5 to 20 minutes. The result is one of four messages:
| Message | Meaning |
|---|---|
| Windows Resource Protection did not find any integrity violations | System files are fine |
| ...found corrupt files and successfully repaired them | Fixed. Restart the computer |
| ...found corrupt files but was unable to fix some of them | Run DISM (step 1), restart, then sfc again |
| ...could not perform the requested operation | Run it from Safe Mode or the recovery environment |
A log of what was repaired is kept at C:\Windows\Logs\CBS\CBS.log.
3. CHKDSK
chkdsk C: /f
For the drive Windows runs from, it replies that the volume is in use and asks to check at the next restart. Type Y, press Enter, and restart. The check runs before Windows loads, usually for a few minutes.
/ffixes errors in the file system./ralso reads the whole surface for bad sectors. On a large hard disk this takes hours; use it when you suspect physical damage. On an SSD,/fis normally enough.- For another drive, change the letter:
chkdsk E: /fruns at once.
After the restart, the result is in Event Viewer › Windows Logs › Application, source "Wininit". "Windows has scanned the file system and found no problems" is the good news. Bad sectors found, or a check that must repair things every time it runs, means the disk is wearing out: back up and plan to replace it.
Never switch the computer off during chkdsk.
Running them when Windows will not start
From the recovery screen choose Troubleshoot › Advanced options › Command Prompt. The Windows drive may carry a different letter there; find it with dir C:\Windows, dir D:\Windows and so on. Then, using that letter:
chkdsk C: /f
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
DISM /Image:C:\ /Cleanup-Image /RestoreHealth
What these commands cannot fix
- Problems caused by a program, a driver or a setting: see Safe Mode and System Restore.
- Failing hardware: memory (test with
mdsched), a dying disk, overheating. - Malware that is still active: scan with Windows Security first.
If all three report clean and the fault remains, repair Windows over itself with Settings › System › Recovery › Fix problems using Windows Update on Windows 11, or see Reset this PC.
Do these commands delete my files?
No. sfc and DISM work only on Windows system files. chkdsk repairs the file system; in rare cases of severe damage it moves unreadable fragments into a folder named found.000.
How often should I run them?
Only when there is a problem. They are repair tools, not routine maintenance.
Can I use the computer while they run?
Yes for DISM and sfc, though it will be slower. chkdsk on the Windows drive runs at restart, before you can sign in.
For Windows 11 and Windows 10. Written in November 2026. Menus move between updates; use the search box in Settings if a name differs. Back up important files before any step that resets, repairs a disk or opens the computer. This is an independent guide, not connected with Microsoft.