Use this when Windows updates fail, system files are corrupt or features cannot be installed, and you need DISM and sfc repairs.
DISM & System Repair
DISM and system repair tools fix a damaged Windows installation: DISM /Online /Cleanup-Image /RestoreHealth repairs the component store, then sfc /scannow repairs protected system files from it.
1. DISM … /CheckHealth.
2. /ScanHealth if suspected.
3. /RestoreHealth (with /Source:wim:<path>:<index> /LimitAccess if no WU).
4. Then sfc /scannow.
5. Reboot; re-run sfc.
component store checked → repaired → system files verified by SFC
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
DISMPrimary Commands
Configuration and operational commands for this Topic.
DISMReferenceService and repair Windows images, for example DISM /Online /Cleanup-Image /RestoreHealth.
Windows / Windows Server / PowerShell · mixedSFCReferenceSystem File Checker; sfc /scannow verifies and repairs protected system files.
Windows / Windows Server / PowerShell · mixedsfc /scannowReferenceScan and repair protected Windows system files.
Windows / Windows Server / PowerShell · mixedVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Running SFC repeatedly when the component store itself is corrupt.
- RestoreHealth failing on WSUS clients that cannot reach Windows Update (give a
/Source).
Subtopics
Go one level deeper into this subject.
The component store (WinSxS) holds all Windows components and their versions, used for installing updates, features and repairs.
Subtopic WinSxSWinSxS (C:\Windows\WinSxS) is the folder holding the component store.
Subtopic CheckHealthDISM /Online /Cleanup-Image /CheckHealth quickly reports whether the component store has been flagged as corrupt, without scanning.
Subtopic ScanHealthDISM /Online /Cleanup-Image /ScanHealth performs a full scan of the component store for corruption and records the result, taking several minutes, without repairing anything.
Subtopic RestoreHealthDISM /Online /Cleanup-Image /RestoreHealth scans the component store and repairs corruption from Windows Update or a /Source such as install.wim.
Subtopic Component Store TroubleshootingTroubleshoot the component store by running DISM ScanHealth and RestoreHealth, reading C:\Windows\Logs\DISM\dism.log and CBS.log, and providing a matching install.wim as /Source if Windows Update cannot be used.
- Repair the component store first (DISM), then files (sfc).
- RestoreHealth needs a source matching the build.
- Logs: CBS.log and dism.log.
DISM /Online /Cleanup-Image /CheckHealth— quick corruption flag checkDISM /Online /Cleanup-Image /ScanHealth— full scanDISM /Online /Cleanup-Image /RestoreHealth— repair from Windows Update or /Sourcesfc /scannow— verify/repair system filesGet-Content C:\Windows\Logs\CBS\CBS.log -Tail 50— servicing log
ReferenceWhy it matters1 section · depth on demand
How it works
Windows keeps a component store (C:\Windows\WinSxS) with the files for installed features and updates. DISM checks and repairs that store, using Windows Update or a supplied source (/Source:wim:D:\sources\install.wim:1 /LimitAccess). SFC then checks protected system files against the store and replaces corrupt ones. Run DISM first, because SFC can only repair from a healthy store.
ReferenceImportant terms & boundaries1 section · depth on demand
Repair sequence
1. Dism /Online /Cleanup-Image /CheckHealth
2. Dism /Online /Cleanup-Image /ScanHealth
3. Dism /Online /Cleanup-Image /RestoreHealth
4. sfc /scannow
5. Reboot and check CBS.log if errors remain.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in DISM & System Repair. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/what-is-dism · confidence 94%