DISM & System Repair
Cheat sheet · https://pcornel.dk/topic.php?topic=3184
Answer
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.
Remember
- Repair the component store first (DISM), then files (sfc).
- RestoreHealth needs a source matching the build.
- Logs: CBS.log and dism.log.
First checks
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
Commands
DISM- Service and repair Windows images, for example DISM /Online /Cleanup-Image /RestoreHealth.
SFC- System File Checker; sfc /scannow verifies and repairs protected system files.
sfc /scannow- Scan and repair protected Windows system files.
Verify in this order
component store checked → repaired → system files verified by SFC
Where it usually breaks
First mismatch in source/package/image/device identity → servicing/setup configuration → installation/activation → reboot/boot/runtime → system/component health → user/workload validation; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3184