When your computer starts acting up—slow performance, crashes, blue screens, or strange errors—you don't always need professional help. Windows includes powerful built-in repair tools that can fix many common problems. This guide covers the three most useful repair commands: SFC, DISM, and CHKDSK, plus a few additional tricks that can save you time and money.
TL;DR
- SFC /scannow - Scans and repairs corrupted system files
- DISM - Repairs the Windows image that SFC uses, run this first if SFC fails
- CHKDSK /r /f - Checks and repairs hard drive errors
- Always run these commands as Administrator
- These tools can take 15 minutes to several hours depending on your system
Before You Start: Run as Administrator
All of these commands require Administrator privileges. Here's how to open Command Prompt or PowerShell as Administrator:
- Press Windows Key + X
- Select "Windows PowerShell (Admin)" or "Command Prompt (Admin)"
- Click "Yes" when Windows asks for permission
Alternatively, search for "cmd" or "PowerShell" in the Start menu, right-click the result, and select "Run as administrator."
1. System File Checker (SFC /scannow)
SFC (System File Checker) scans your Windows installation for corrupted system files and attempts to repair them using cached copies from the Windows installation. This is your first line of defense against system file corruption.
When to Use SFC
- Random crashes or blue screens
- Programs won't start or crash unexpectedly
- Windows Update failures
- "DLL is missing" errors
- Strange system behavior you can't explain
How to Run SFC
In your Administrator Command Prompt or PowerShell, type:
sfc /scannow
This will scan your entire system and attempt to repair any corrupted files. The process typically takes 15-30 minutes, but can take longer on older or slower systems.
Understanding SFC Results
After the scan completes, you'll see one of these messages:
- "Windows Resource Protection did not find any integrity violations" - Your system files are fine, or SFC successfully repaired them.
- "Windows Resource Protection found corrupt files and successfully repaired them" - SFC found and fixed problems. You may need to restart.
- "Windows Resource Protection found corrupt files but was unable to fix some of them" - This is where DISM comes in. The corruption is deeper than SFC can handle.
View Detailed SFC Logs
If you want to see exactly what SFC found and fixed, check the CBS log file:
findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"
This creates a text file on your desktop with detailed repair information.
2. DISM (Deployment Image Servicing and Management)
DISM is a more powerful tool that repairs the Windows image itself. If SFC can't fix your problems, it's often because the Windows component store (where SFC gets its repair files) is corrupted. DISM fixes that.
When to Use DISM
- SFC found corrupt files but couldn't repair them
- Windows Update won't install updates
- System restore isn't working
- You're seeing "Windows Resource Protection could not perform the requested operation"
DISM Commands (Run in Order)
Step 1: Check the health of your component store
DISM /Online /Cleanup-Image /CheckHealth
This runs quickly (usually under a minute) and just checks if there are any problems. If it finds nothing, you can skip the next steps.
Step 2: Scan for component store corruption (if Step 1 found issues)
DISM /Online /Cleanup-Image /ScanHealth
This scans your component store but doesn't repair anything yet. Takes 5-15 minutes.
Step 3: Repair the component store (if Step 2 found corruption)
DISM /Online /Cleanup-Image /RestoreHealth
This is the actual repair command. It downloads healthy files from Windows Update to replace corrupted ones. This can take 20 minutes to over an hour, depending on your internet connection and the extent of corruption.
Important: After running DISM /RestoreHealth, run SFC /scannow again. DISM fixes the source files that SFC uses, so SFC can now properly repair your system files.
DISM Without Internet Access
If you don't have internet access or Windows Update isn't working, you can use a Windows installation media (USB or ISO) as the source:
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:X:\Sources\Install.wim:1 /LimitAccess
Replace X: with the drive letter of your installation media.
3. CHKDSK (Check Disk)
CHKDSK checks your hard drive for file system errors and bad sectors. Unlike SFC and DISM (which fix Windows files), CHKDSK fixes problems with your storage drive itself.
When to Use CHKDSK
- Computer freezes or becomes unresponsive
- Slow file access or file corruption
- You see errors about "cyclic redundancy check"
- Files or folders disappear
- Windows suggests running CHKDSK after a crash
- You want to check drive health (especially on older drives)
How to Run CHKDSK
For your main drive (usually C:):
chkdsk C: /r /f
The /f flag fixes file system errors, and /r finds bad sectors and recovers readable information. Since you can't repair the drive you're running Windows from, CHKDSK will schedule the scan to run on the next restart.
For other drives:
Replace C: with the drive letter. The scan will run immediately if the drive isn't in use.
CHKDSK Time Expectations
CHKDSK can take a very long time, especially the /r option:
- Small drive (250GB): 1-3 hours
- Medium drive (500GB-1TB): 2-6 hours
- Large drive (2TB+): 4-12+ hours
- SSD: Usually faster, but still can take 30 minutes to 2 hours
Don't interrupt CHKDSK once it starts. It's best to run it overnight or when you don't need the computer for several hours.
CHKDSK Without Repair (Quick Check)
If you just want to see if there are problems without fixing them:
chkdsk C:
This runs a read-only scan that won't make changes.
The Complete Repair Sequence
When your computer is having serious issues, run these commands in this order:
- DISM /Online /Cleanup-Image /RestoreHealth - Fixes the Windows image
- SFC /scannow - Repairs system files using the now-fixed image
- Restart your computer
- CHKDSK C: /r /f - Fixes drive errors (will run on restart)
- Restart again - Let CHKDSK complete
Additional Easy Repair Tricks
1. Windows Memory Diagnostic
If you're experiencing random crashes, blue screens with memory-related errors, or system instability, your RAM might be faulty:
- Press Windows Key + R
- Type
mdsched.exeand press Enter - Choose "Restart now and check for problems"
- The test will run on restart (takes 10-30 minutes)
2. System File Checker Alternative: Verify Only
To check for corruption without repairing:
sfc /verifyonly
Useful if you want to see what's wrong before committing to a full repair scan.
3. Disk Cleanup with System Files
Windows accumulates temporary files that can cause problems. Run the advanced Disk Cleanup:
- Press Windows Key + R
- Type
cleanmgr /d C:(replace C: with your drive) - Click "Clean up system files"
- Select everything (or at least: Temporary files, Windows Update Cleanup, Previous Windows installations)
- Click OK
4. Windows Update Troubleshooter
If Windows Update is broken, use the built-in troubleshooter:
- Open Settings (Windows Key + I)
- Go to Update & Security → Troubleshoot
- Click "Additional troubleshooters"
- Run "Windows Update" troubleshooter
5. Network Reset (For Connection Issues)
If you're having internet or network problems:
- Open Settings → Network & Internet
- Scroll down and click "Network reset"
- Click "Reset now"
- Restart your computer
Warning: This removes all network adapters and settings. You'll need to reconnect to Wi-Fi networks.
6. Clean Boot (For Software Conflicts)
If startup programs or services are causing problems:
- Press Windows Key + R
- Type
msconfigand press Enter - Go to the "Services" tab
- Check "Hide all Microsoft services"
- Click "Disable all"
- Go to the "Startup" tab → Click "Open Task Manager"
- Disable all startup items
- Restart your computer
If problems are gone, re-enable services and startup items one by one to find the culprit.
When These Tools Aren't Enough
These built-in tools fix many problems, but they won't help with:
- Hardware failures - Bad RAM, failing hard drive (beyond file system errors), overheating CPU
- Virus/malware - Use Windows Defender or professional antivirus
- Driver issues - Update drivers from Device Manager or manufacturer's website
- Registry corruption - These tools don't fix registry problems
- Windows installation corruption - May need a repair install or clean reinstall
If you've run SFC, DISM, and CHKDSK and problems persist, it's time to consider:
- Running a full antivirus scan
- Updating all drivers (especially graphics and chipset)
- Checking hardware health (temperature, SMART status)
- Performing a Windows repair install (keeps your files and programs)
- Backing up data and doing a clean Windows reinstall
Best Practices
- Back up your data first - These tools are generally safe, but always back up important files before running repairs
- Run one tool at a time - Don't run multiple repair tools simultaneously
- Don't interrupt the process - Let each tool complete fully
- Restart after repairs - Many fixes require a restart to take effect
- Run these regularly - If your computer is used heavily, run SFC monthly as preventive maintenance
- Keep Windows updated - Updates include fixes that can prevent problems
Summary
SFC, DISM, and CHKDSK are powerful tools that come free with Windows. They can fix many common computer problems without needing professional help or expensive software. Start with SFC for file corruption, use DISM if SFC can't fix it, and run CHKDSK if you're having drive-related issues. Combined with the additional tricks mentioned, you can resolve most Windows problems yourself.
Remember: these tools are preventative and curative. Regular maintenance keeps your system running smoothly, but when problems do arise, knowing how to use these commands can save you significant time and money.