
DISM /Online /Cleanup-Image /RestoreHealth: Repair Windows
Most users reach for SFC first when Windows files get corrupted — but Microsoft engineers say that order is wrong. This guide explains what DISM /Online /Cleanup-Image /RestoreHealth does, when to use it, and the exact sequence that fixes corruption: DISM first, then SFC.
Command syntax: DISM /Online /Cleanup-Image /RestoreHealth ·
Required privileges: Administrator ·
Default file source: Windows Update ·
Typical runtime: 15–30 minutes
Quick snapshot
- Deployment Image Servicing and Management tool (Microsoft Learn)
- Repairs the Windows system image (Microsoft Learn) (Microsoft Learn)
- Scans for corruption with /ScanHealth (Sweetwater guide)
- Open Command Prompt as administrator (Sweetwater guide) (Microsoft Learn)
- Start with DISM /RestoreHealth (Sweetwater guide) (Microsoft Learn)
- Then run SFC /scannow (Microsoft Learn)
- Reboot and verify (Sweetwater guide) (Microsoft Learn)
- SFC checks protected system files (Microsoft Learn) (EaseUS troubleshooting guide)
- DISM fixes the component store that SFC relies on (EaseUS troubleshooting guide)
- Always run DISM first if corruption is suspected (EaseUS troubleshooting guide)
- Stuck at 62.3%: restart or use local source (EaseUS troubleshooting guide)
- Error 87: incorrect syntax (Microsoft Learn)
- Error 50: insufficient permissions
Four key facts, one pattern: DISM’s /RestoreHealth command is the most powerful repair tool available, but its success depends on source availability and correct syntax.
| Label | Value |
|---|---|
| Full command | DISM /Online /Cleanup-Image /RestoreHealth |
| Requires admin | Yes |
| Default source | Windows Update |
| Windows version support | 7, 8, 10, 11 |
What does DISM /Online /Cleanup-Image /RestoreHealth do?
Understanding the DISM tool
- DISM stands for Deployment Image Servicing and Management — a built-in Windows tool for servicing both online and offline images (Microsoft Learn).
- It can repair the component store, which contains the files that System File Checker (SFC) needs to restore protected system files.
What happens during /RestoreHealth
- The command scans the online Windows image for corruption and attempts to repair any problems it finds, using Windows Update as the default source for healthy files (Sweetwater guide).
- If Windows Update is unavailable or fails, you can specify a local source using the
/Sourceparameter and/LimitAccessto prevent online fallback (Microsoft Learn documentation).
Differences between DISM and SFC
- SFC (
sfc /scannow) scans the integrity of all protected system files and replaces corrupted versions from the local cache. - DISM, at a deeper level, repairs the source of the system files — the component store — that SFC itself depends on (EaseUS troubleshooting guide).
- This is why Microsoft says: “SFC is a quick check; DISM /Cleanup-Image is more extensive” (Microsoft Learn).
The implication: DISM targets the root cause while SFC handles the symptoms.
Should you run SFC or DISM first?
Why order matters
- If the component store is damaged, SFC cannot find healthy copies of files to replace corrupted ones — even if the corruption is file-level. DISM fixes the store first.
- Microsoft’s official repair workflow recommends starting with DISM /ScanHealth, then /RestoreHealth, then SFC (Microsoft Learn guidance).
When to start with SFC
- If you have a specific file error (e.g., a missing DLL or access violation) and no other symptoms of system-wide corruption, SFC alone may fix it quickly.
- But if SFC reports that it found corrupt files but was unable to fix some of them, that’s a sign DISM is needed next.
When to start with DISM
- When Windows Update itself is broken, SFC fails repeatedly, or you see blue screen errors — start with DISM.
- After a malware infection or a failed system update, DISM should always be the first step.
What this means: Order is not a preference but a logical dependency — without a healthy image, SFC is powerless.
How to fix corrupted files on Windows using SFC and DISM?
Step-by-step DISM repair
- Open Command Prompt as administrator — press Win + X, select “Terminal (Admin)” or “Command Prompt (Admin)”.
- Type
DISM /Online /Cleanup-Image /RestoreHealthand press Enter. The scan will take 15–30 minutes (Sweetwater notes typical runtime). - If you get error 87, check your syntax — missing spaces or wrong slashes cause this (Microsoft Learn).
- If the scan gets stuck at 62.3%, try running from Safe Mode or using a local source (EaseUS troubleshooting guide).
Running SFC after DISM
- Once DISM completes (check CBS.log for details), run
sfc /scannowin the same elevated prompt (Microsoft Learn). - SFC will now have a healthy component store to draw from, so file-level repairs are more likely to succeed.
Verifying repairs
- After both scans, reboot and test the issue that prompted the repair.
- Check the CBS log at
C:\Windows\Logs\CBS\CBS.logfor detailed repair results.
The pattern: Each tool plays a specific role — DISM prepares the foundation, SFC builds on it.
When should I use DISM /RestoreHealth?
Symptoms that require DISM
- Windows Update errors (0x800f081f, 0x80073712, 0x80070002) that persist after basic troubleshooting.
- SFC reports “Windows Resource Protection found corrupt files but was unable to fix some of them”.
- System instability, blue screens, or missing system files that aren’t resolved by a standard reboot.
Common error codes
- Error 87: The parameter is incorrect — usually a typo in the command syntax.
- Error 50: DISM does not support this operation on the current platform — run as administrator or check Windows version.
- Stuck at 62.3%: The scan is waiting for a response from Windows Update. Use a local source to bypass the delay (EaseUS troubleshooting guide).
Preemptive maintenance
- Running DISM /CheckHealth periodically (once a month) can detect corruption early before it causes symptoms.
- Combine with a clean up of temporary files and a disk health check (CHKDSK) for a full system check.
The catch: Waiting for symptoms means your image is already compromised — proactive checks save time.
How to repair Windows with DISM?
Basic syntax
DISM /Online /Cleanup-Image /CheckHealth— quick status check (doesn’t repair).DISM /Online /Cleanup-Image /ScanHealth— deeper scan for corruption, no repair (Sweetwater guide).DISM /Online /Cleanup-Image /RestoreHealth— full scan and repair using Windows Update.
Using a local source
- If Windows Update is broken or slow, mount a Windows install.wim and use it as a local source:
DISM /Online /Cleanup-Image /RestoreHealth /Source:C:\mount\windows /LimitAccess(Microsoft Learn documentation). - You can also use a Windows installation DVD or USB as the source.
Troubleshooting stuck scans
- If the scan stays at 62.3% for more than 30 minutes, cancel with Ctrl+C and rerun in Safe Mode (Sweetwater guide).
- Running CHKDSK first can fix disk-level issues that cause DISM to hang (EaseUS troubleshooting guide).
What this means: The offline source option removes the internet dependency — critical when Windows Update itself is broken.
Six items of comparison, one pattern: DISM works at the image level; SFC works at the file level. One is not a replacement for the other.
| Feature | DISM /RestoreHealth | SFC /scannow |
|---|---|---|
| Scope | System image / component store | Protected system files |
| Repair source | Windows Update or local .wim | Local cache (csr) |
| Recommended order | First | Second |
| Typical duration | 15–30 minutes | 5–15 minutes |
| Safe to run frequently | Yes (CheckHealth is faster) | Yes |
| Requires internet | Default yes, can be offline with /Source | No |
Upsides
- Fixes corruption at the source
- Works even when SFC can’t
- Supports offline images
- No data loss – safe to run
Downsides
- Can be slow, especially with Windows Update
- Requires administrator privileges
- Error 87 and 50 are frustrating for beginners
- May get stuck without a local source
Clarity: What’s confirmed and what remains unclear
Confirmed facts
- DISM can repair component store corruption (Microsoft Learn)
- SFC scans integrity of protected system files (Microsoft Learn)
- Running DISM before SFC is recommended by Microsoft (Microsoft Learn guidance)
What’s unclear
- Exact success rate depends on source availability and internet connectivity
- Whether a single run always resolves all corruption – in severe cases, multiple runs or an in-place upgrade may be needed
Expert perspectives
“DISM /Online /Cleanup-Image /RestoreHealth repairs the Windows system image and requires administrator privileges.”
— Microsoft Learn (official documentation)
“Running DISM before SFC is normal practice, and it’s common for the scan to take a long time. If it appears stuck, it’s usually just still working.”
— Sweetwater tech guide
The order of DISM and SFC isn’t a technical preference — it’s a logical dependency. Skipping DISM when the component store is damaged means SFC will fail repeatedly, and users waste time chasing symptoms rather than the root cause.
For anyone facing persistent Windows corruption, the choice is clear: run DISM /Online /Cleanup-Image /RestoreHealth first, then SFC /scannow, and verify with a reboot. Ignoring the order means longer downtime and unresolved errors.
learn.microsoft.com, youtube.com, superops.com, tenforums.com, youtube.com
If you need a more detailed walkthrough, the DISM repair command explained offers additional troubleshooting steps and error code explanations.
Frequently asked questions
Can I run DISM /RestoreHealth without internet?
Yes. Use the /Source and /LimitAccess parameters to point to a local Windows image or installation media (Microsoft Learn).
What does DISM error 87 mean and how to fix it?
Error 87 means “The parameter is incorrect.” Check for typos — missing spaces, wrong slashes, or incorrect flags. Standard syntax: DISM /Online /Cleanup-Image /RestoreHealth.
Is DISM /RestoreHealth safe to run?
Yes. It is a read-only scan until it finds corruption to repair. It does not delete user data or change personal files. It is built into Windows and safe for all users.
How long does DISM /RestoreHealth typically take?
Most scans finish in 15 to 30 minutes. If using Windows Update as the source, network speed affects duration. A stuck scan at 62.3% may require a local source or Safe Mode rerun (Sweetwater guide).
What is the difference between DISM ScanHealth and RestoreHealth?
ScanHealth checks the image for corruption and reports whether it’s repairable. RestoreHealth performs the same scan and attempts to repair any corruption found (Microsoft Learn).
Can DISM /RestoreHealth fix blue screen errors?
It can if the blue screen is caused by system file corruption. BSODs from driver issues or hardware faults are outside DISM’s scope.
Does DISM work in Safe Mode?
Yes, and it’s often recommended when DISM gets stuck during a normal boot. Safe Mode loads minimal drivers, which can help the scan complete (Sweetwater guide).