Repair Windows System Files with DISM and SFC

Open CMD or PowerShell as administrator.

1. Repair the component store (online, uses Windows Update):

DISM /Online /Cleanup-Image /RestoreHealth

2. Check and repair system files:

sfc /scannow

Run DISM first: SFC repairs files from the component store, so if the store is damaged SFC can't fix anything. Reboot at the end.

Quick checks without repairing:

DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth

No internet or WSUS blocking it? Use an ISO of the same build as source:

DISM /Online /Cleanup-Image /RestoreHealth /Source:wim:D:\sources\install.wim:1 /LimitAccess

Logs: C:\Windows\Logs\CBS\CBS.log and C:\Windows\Logs\DISM\dism.log.

Written by Daniel Ruiz Peláez, Systems & Infrastructure Engineer (Linux, VMware, Proxmox, Active Directory, networking and security). These are notes from real problems I have solved.

← Back to all posts