COMMAND

DISM /RestoreHealthDeployment Image Servicing and Management

DISM /Online /Cleanup-Image /RestoreHealth repairs the Windows component store (WinSxS), the source that System File Checker uses to fix system files. Run it before sfc when sfc cannot repair everything. It downloads healthy files from Windows Update by default, or from a mounted image you specify.

BlackhawkHub Editorial · Updated

Purpose

DISM (Deployment Image Servicing and Management) services Windows images. For everyday repair, its /Cleanup-Image operations fix the component store (the WinSxS folder), which holds the master copies of Windows files. sfc restores system files from this store, so if the store is damaged, sfc cannot fully repair the system until DISM has fixed the store.

The three health operations

cmd
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
OperationSpeedWhat it does
CheckHealthSecondsReads a flag from previous scans; reports whether corruption was already detected
ScanHealthMinutesFull scan for corruption; no repair
RestoreHealthLongerFull scan and repair, fetching replacement files

/Online targets the running Windows installation. Progress may appear to stall around 20% and 40%; that is normal.

The full repair sequence

cmd
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Run DISM first, then sfc, then reboot and retest.

Repairing offline or without internet

If Windows Update cannot supply the files (error 0x800f081f), mount an ISO of the exact same Windows version and build, then point DISM at it:

cmd
DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\sources\install.wim:1 /LimitAccess
  • E: is the mounted ISO's drive letter.
  • :1 is the image index (use DISM /Get-WimInfo /WimFile:E:\sources\install.wim to list editions).
  • /LimitAccess stops DISM from contacting Windows Update.
  • If the media has install.esd instead of install.wim, reference that.

Other useful operations

cmd
DISM /Online /Cleanup-Image /StartComponentCleanup
DISM /Online /Cleanup-Image /AnalyzeComponentStore

The first reclaims space from superseded components; the second reports whether cleanup is recommended.

Log

DISM writes to C:\Windows\Logs\DISM\dism.log.

Common mistakes

  • Running sfc alone for corruption that originates in the store, then wondering why it recurs.
  • Using a mismatched source. The /Source media must match the installed version and build, or repair fails or introduces new problems.
  • Not elevating. DISM servicing requires administrator rights.
  • Expecting DISM to fix disk or driver faults. It repairs Windows component files, not hardware; see chkdsk.

Frequently asked questions

What is the difference between CheckHealth, ScanHealth and RestoreHealth?

CheckHealth is a quick check of a flag set by earlier scans. ScanHealth performs a full scan for corruption but does not repair. RestoreHealth performs a full scan and repairs any corruption found, downloading replacement files as needed.

DISM RestoreHealth fails with 0x800f081f — what now?

DISM could not find healthy replacement files. Point it at a known-good source with /Source: from a mounted Windows ISO of the same version and build, and add /LimitAccess to skip Windows Update. See the 0x800f081f record.

Does DISM need internet?

By default it fetches files from Windows Update, so yes. With /Source: pointing at an install.wim or install.esd from matching installation media, it works offline.

Sources