DISM /RestoreHealth: How to Repair Windows 11 With DISM Commands
DISM /RestoreHealth repairs the Windows component store, the protected library of system files that Windows 11 uses to fix itself. Run DISM /Online /Cleanup-Image /RestoreHealth from an elevated Command Prompt, wait for “The operation completed successfully”, then run sfc /scannow so the repaired store can restore any damaged system files.
Key takeaways
- DISM fixes the component store; SFC then uses that store to fix live system files. Run DISM first, SFC second.
- Use
/CheckHealthfor a quick check,/ScanHealthfor a deeper scan and/RestoreHealthto repair. - By default DISM downloads clean files from Windows Update. If that fails (error 0x800f081f), point it at a Windows 11 ISO with
/Sourceand/LimitAccess. - DISM does not touch your files, apps or Windows activation. It repairs system components only.
- If DISM and SFC both fail, Windows 11’s “Fix problems using Windows Update” reinstall keeps your apps and files.
In this guide
- What does DISM /RestoreHealth do?
- How to run DISM /RestoreHealth on Windows 11
- DISM commands: CheckHealth vs ScanHealth vs RestoreHealth
- How to repair with a Windows 11 ISO as the source
- Common DISM errors and what they mean
- What to do when DISM can’t repair Windows
- Frequently asked questions
- The bottom line
- Useful links
What does DISM /RestoreHealth do?
DISM (Deployment Image Servicing and Management) /RestoreHealth scans the Windows component store in C:\Windows\WinSxS for corruption and replaces damaged pieces with clean copies. Those copies come from Windows Update by default, or from a source you choose, such as a mounted Windows 11 ISO.
The component store matters because System File Checker (SFC) depends on it. When SFC finds a broken system file, it copies a good version out of the store. If the store itself is damaged, SFC reports that it “found corrupt files but was unable to fix some of them”.
That is why Microsoft’s own System File Checker guidance tells you to run DISM first and SFC second. DISM repairs the toolbox; SFC then uses the toolbox.
Signs you need a DISM repair
- SFC says it could not repair some files.
- Windows updates fail repeatedly or roll back.
- Built-in apps, Settings pages or Windows features crash or will not open.
- Optional features fail to install with “source files could not be found”.
A slow PC on its own is rarely a DISM problem. If performance is the main complaint, our guide to speeding up Windows 11 is the better starting point.
How to run DISM /RestoreHealth on Windows 11
Open Terminal or Command Prompt as administrator, type DISM /Online /Cleanup-Image /RestoreHealth and press Enter. Keep the PC plugged in and online. The scan usually takes 10 to 30 minutes, then you finish with sfc /scannow and a restart.
- Right-click the Start button and choose Terminal (Admin), or search for cmd, right-click Command Prompt and choose Run as administrator. Accept the User Account Control prompt.
- Optional quick check: type
DISM /Online /Cleanup-Image /CheckHealthand press Enter. It finishes in seconds and reports whether corruption has already been flagged. - Run the repair: type
DISM /Online /Cleanup-Image /RestoreHealthand press Enter. Note the space before every forward slash. - Wait for “The restore operation completed successfully” or “The operation completed successfully”. Progress often pauses at around 20% or 60%; that is normal, so leave it running.
- Type
sfc /scannowand press Enter. Wait for “Verification 100% complete”. - Restart the PC, then run
sfc /scannowonce more to confirm it reports no integrity violations.
If you prefer PowerShell, Repair-WindowsImage -Online -RestoreHealth does the same job. Both versions need administrator rights.
DISM only repairs Windows system components. It does not delete documents, uninstall apps or change your licence, so a correctly activated copy of Windows 11 stays activated afterwards.

DISM commands: CheckHealth vs ScanHealth vs RestoreHealth
The three /Cleanup-Image health switches do different jobs. CheckHealth reads an existing corruption flag in seconds, ScanHealth runs a full scan without repairing anything, and RestoreHealth scans and repairs. Most people can go straight to RestoreHealth, because it performs the scan as part of the repair.
| DISM command | What it does | Typical time | Changes anything? |
|---|---|---|---|
DISM /Online /Cleanup-Image /CheckHealth |
Reports whether corruption has been recorded and whether it is repairable | Seconds | No |
DISM /Online /Cleanup-Image /ScanHealth |
Full scan of the component store for corruption | Several minutes | No |
DISM /Online /Cleanup-Image /RestoreHealth |
Scans and replaces corrupt components (Windows Update as source) | 10–30+ minutes | Yes |
DISM /Online /Cleanup-Image /RestoreHealth /Source:... /LimitAccess |
Repairs from a local source only, without Windows Update | 10–30+ minutes | Yes |
DISM /Online /Cleanup-Image /AnalyzeComponentStore |
Reports the WinSxS size and whether cleanup is recommended | A few minutes | No |
DISM /Online /Cleanup-Image /StartComponentCleanup |
Removes superseded component versions to save space | Several minutes | Yes |
DISM /Get-WimInfo /WimFile:D:\sources\install.wim |
Lists the editions (indexes) inside an image file | Seconds | No |
The /Online switch means “the Windows installation I’m running now”. Replace it with /Image:D:\ when you repair an offline installation from recovery media.
A word on /StartComponentCleanup /ResetBase: Microsoft’s WinSxS cleanup documentation warns that after ResetBase, updates already installed can no longer be uninstalled. It is a space-saving tool, not a repair step, so leave it out of troubleshooting.
How to repair with a Windows 11 ISO as the source
When Windows Update cannot supply clean files, mount a Windows 11 ISO that matches your installed version and edition, find the right index, then run RestoreHealth with /Source pointing at install.wim or install.esd and add /LimitAccess so DISM stops trying Windows Update.
- Download the Windows 11 ISO from Microsoft’s Windows 11 download page. Pick the same language as your installation and, ideally, the same feature update (check with
winver). - Right-click the ISO and choose Mount. Note the new drive letter, for example
D:. - Open
D:\sourcesand see whether it containsinstall.wimorinstall.esd. - List the editions:
DISM /Get-WimInfo /WimFile:D:\sources\install.wim(useinstall.esdif that is the file you have). Note the index number for your edition, such as Windows 11 Pro. - Run the repair, replacing the index number with yours:
DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.wim:6 /LimitAccess
For an ESD file, use/Source:ESD:D:\sources\install.esd:6instead. - When it completes, run
sfc /scannowand restart.
Microsoft’s Repair a Windows Image page explains that /LimitAccess prevents DISM from using Windows Update as a repair source. If you give several sources, DISM copies from the first one where it finds the files.
If you already have a USB installer from our Windows 11 bootable USB guide, you can use its sources folder instead of an ISO.
Why the edition and version must match
DISM copies individual components, so the source has to contain the same builds your PC uses. A Home index cannot repair Pro-only components, and an ISO from an older feature update may lack the newer files. A common support ticket we see is a “source files could not be found” error that disappears once the correct index is used.
Common DISM errors and what they mean
Most DISM failures come from three causes: a typing mistake in the command, no reachable source for clean files, or a pending update blocking servicing. The error code points you to which one. Details for every run are written to %windir%\Logs\DISM\dism.log and %windir%\Logs\CBS\CBS.log.
| Error | Likely cause | What to try |
|---|---|---|
| Error 87 (“The parameter is incorrect”) | Typo or missing space before a slash | Retype the command exactly, with a space before each /, in an admin window |
| 0x800f081f (“The source files could not be found”) | Windows Update could not supply files, or the /Source index or version is wrong |
Use a matching ISO with the correct index and /LimitAccess |
| Error 740 (“Elevated permissions are required”) | Window not opened as administrator | Reopen Terminal or Command Prompt with Run as administrator |
| 0x800f0906 or 0x800f0907 | Download blocked, often by network or Group Policy settings on managed PCs | Check your connection, or use a local source; on work PCs ask IT |
| Stuck at a percentage | Normal pauses while DISM processes large components | Leave it for at least an hour before cancelling |
Before retrying after any error, restart the PC and let pending updates finish. Running DISM while an update is half-installed is a frequent cause of repeated failures.
Repair worked, but Windows says it isn’t activated?
DISM never removes a valid licence, so an activation warning after a repair usually means the PC never had a genuine one, or the hardware has changed. If you need a fresh licence for a rebuilt PC, a Windows 11 Pro OEM key is a cost-effective option for a single machine you plan to keep.
What to do when DISM can’t repair Windows
If DISM and SFC both fail, the next step on Windows 11 is Settings > System > Recovery > Fix problems using Windows Update > Reinstall now. It reinstalls the current version of Windows and keeps your apps, files and settings. A clean installation is the final fallback.
Microsoft notes in its reinstall guidance that this option may be missing on older Windows 11 builds and on work-managed PCs. In that case an in-place upgrade does a similar job: mount the ISO, run setup.exe and choose to keep personal files and apps.
- Back up first. Copy important files to an external drive or cloud storage before any reinstall.
- Try the Windows Update reinstall from the Recovery page.
- Try an in-place upgrade from a matching ISO if the reinstall option is missing.
- Clean install as a last resort, following our Windows 11 Pro download and installation guide.
If a file has already gone missing during the trouble, see our guide to recovering deleted files in Windows 11 before you reinstall anything. If you replace the motherboard as part of the fix, read about Windows activation after a hardware change.
Frequently asked questions
Is it safe to run DISM /RestoreHealth?
Yes. DISM /RestoreHealth is a built-in Microsoft tool that only replaces damaged Windows system components with clean copies. It does not delete personal files, uninstall apps or change your licence. The one thing to avoid is interrupting it or switching the PC off mid-repair, so keep a laptop on mains power.
Should I run SFC or DISM first?
Run DISM first, then SFC. SFC repairs system files by copying good versions from the component store, and DISM is the tool that repairs that store. If the store is damaged, SFC cannot finish its job. Microsoft’s own guidance lists the DISM command before sfc /scannow.
How long does DISM RestoreHealth take?
On most Windows 11 PCs with an SSD and a decent connection, DISM /RestoreHealth takes about 10 to 30 minutes. Slower hard drives, heavy corruption or a slow download from Windows Update can push it past an hour. Pauses at around 20% or 60% are normal, so give it time before cancelling.
Does DISM need an internet connection?
By default, yes. DISM /RestoreHealth downloads clean files from Windows Update. Without internet access, mount a Windows 11 ISO or USB installer that matches your version and edition, then add /Source:WIM:D:\sources\install.wim:index and /LimitAccess so it repairs from local files only.
Will DISM fix a Windows activation error?
No. DISM repairs system components, not licences. Activation errors come from a missing, mismatched or invalid product key, or from a hardware change. Check the status under Settings > System > Activation and use the activation troubleshooter or a valid key for the edition you have installed.
What does “the component store is repairable” mean?
It means CheckHealth or ScanHealth found corruption in the component store that DISM can fix. Run DISM /Online /Cleanup-Image /RestoreHealth next. If DISM instead reports the store is “not repairable”, a reinstall of Windows that keeps your files is usually the fastest way back to a working system.
The bottom line
DISM /RestoreHealth is the right first move when SFC can’t fix files or updates keep failing: run DISM, then SFC, then restart. If Windows Update can’t supply clean files, a matching ISO with /Source and /LimitAccess usually gets it done. For other common Windows problems, browse the guides in our Help & Support Centre.
Useful links
| Resource | Why it helps |
|---|---|
| Microsoft Learn: Repair a Windows Image | Official DISM repair syntax, /Source and /LimitAccess |
| Microsoft Support: System File Checker | Microsoft’s DISM-then-SFC order |
| Microsoft Support: Reinstall the current version of Windows | Next step when DISM and SFC fail |
| Create a Windows 11 bootable USB | Local repair source and reinstall media |
| Check if Windows 11 is activated | Confirm your licence after repairs |
| Windows 11 Pro installation guide | Clean install as a last resort |
| Windows 11 Pro OEM key | Licence for a rebuilt single PC |