DISM (Deployment Image Servicing and Management)
DISM (Deployment Image Servicing and Management) is a command-line tool built into Windows that services Windows images, including the running system. Home users mostly meet it as the repair tool for the component store: DISM /Online /Cleanup-Image /RestoreHealth fixes corruption that SFC alone cannot repair.
1The three health commands
/CheckHealth quickly reports whether corruption has already been recorded. /ScanHealth performs a longer scan of the component store. /RestoreHealth scans and repairs, downloading good files from Windows Update by default.
With no internet access, /RestoreHealth can use another source, for example a mounted Windows image, with /Source and /LimitAccess.
2DISM and SFC
SFC repairs protected system files from the component store. If the store itself is damaged, SFC cannot finish its repairs. The usual order is therefore DISM /RestoreHealth first, then sfc /scannow.
3Other uses
DISM also adds or removes Windows features and packages, manages drivers in offline images and cleans the component store (/StartComponentCleanup).
How to repair Windows with DISM
- Open Terminal (Admin).
- Run:
DISM /Online /Cleanup-Image /CheckHealth - Run:
DISM /Online /Cleanup-Image /ScanHealth - If corruption is reported, run:
DISM /Online /Cleanup-Image /RestoreHealth - Then run:
sfc /scannowand restart.
Cautions
- /RestoreHealth can take a long time and may appear stuck at a percentage; let it finish.
- Use a source image of the same Windows version and edition when you repair offline.
Related articles
- SFC (System File Checker)What sfc /scannow does, how to read its results, where the CBS.log is and when to run DISM first.
- WinSxS folder (component store)What C:\Windows\WinSxS is, why Explorer overstates its size, and how to shrink it only with supported DISM commands.
- Windows Recovery Environment (WinRE)What WinRE is, how to open it, what tools it offers, and how to check it with reagentc /info.
Sources
- Repair a Windows image (Microsoft Learn) learn.microsoft.com
- What is DISM? (Microsoft Learn) learn.microsoft.com
- DISM operating system package servicing options (Microsoft Learn) learn.microsoft.com
Last reviewed: