Sometimes DISM restorehealth fails due to problems locating online media. Administrators often resort to using offline media only to find the DISM repair fails even though the media is inserted and is correct. The most common problem is when admins copy/paste the command line without differentiating media typew (Windows Core or Windows Server).

Mount the media as a drive volume and run the following command:

dism /online /cleanup-image /restorehealth /source:WIM:x:\sources\install.wim:n /limitaccess

In the command above, replace x with the correct drive letter and replace n the number 1 or 2 depending on whether you are repairing a desktop or core edition of Windows server. 1=core, 2=desktop

For example, a Desktop edition of Windows server with media on drive letter E:

dism /online /cleanup-image /restorehealth /source:WIM:e:\sources\install.wim:2 /limitaccess

A Windows Core edition server with media on drive letter E:

dism /online /cleanup-image /restorehealth /source:WIM:e:\sources\install.wim:1 /limitaccess

Leave a comment

Your email address will not be published. Required fields are marked *

error: Sorry, copy/paste is disabled
Skip to content