Rain WikiWindows · Linux · Android

DISM (Deployment Image Servicing and Management)

Command-line toolWindows 7, 8.1, 10, 11

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

  1. Open Terminal (Admin).
  2. Run: DISM /Online /Cleanup-Image /CheckHealth
  3. Run: DISM /Online /Cleanup-Image /ScanHealth
  4. If corruption is reported, run: DISM /Online /Cleanup-Image /RestoreHealth
  5. Then run: sfc /scannow and 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.

Sources

  1. Repair a Windows image (Microsoft Learn) learn.microsoft.com
  2. What is DISM? (Microsoft Learn) learn.microsoft.com
  3. DISM operating system package servicing options (Microsoft Learn) learn.microsoft.com

Last reviewed: