Computer and Software Support


Repair a Windows Image

Windows 8

This is from Technet.Microsoft.com

Updated: October 20, 2013

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

If a Windows image becomes unserviceable, you can use the Deployment Imaging and Servicing Management (DISM) tool to update the files and correct the problem. You can use DISM to repair an offline Windows image in a WIM or VHD file, or an online Windows image. An online Windows image will also attempt to repair itself if it becomes unserviceable. The repair source for this operation is the same source that is used for Features on Demand and is determined by Group Policy settings. For more information, see Configure a Windows Repair Source. When you use the DISM tool to repair an online or offline image, you can use the /Source argument with the /RestoreHealth argument to specify additional repair source locations to use to search for the required files.

The DISM /ScanHealth, /CheckHealth, and /RestoreHealth arguments can only be used when servicing Windows® 8 or Windows Server® 2012 images.

 

To check if an image is repairable

  1. Scan the image to check for corruption. This operation will take several minutes. For example, at a command prompt, type the following command: (there is a space before each of the /)

Dism /online /Cleanup-Image /ScanHealth

  1. Check the image to see whether any corruption has been detected. For example, at a command prompt, type (there is a space before each of the /):

Dism /Online /Cleanup-Image /Checkhealth

 

To repair an image

  1. Use the /RestoreHaelth argument to repair the image. For example, to repair an offline image using a mounted image as a repair source, at a command prompt, type the following command (there is a space before each of the /)

Dism /Image:c:\offline /Cleanup-image /RestoreHealth /Source:c:\test\mount\windows

  1. To repair an image type the following (there is a space before each of the /)

Dism /Online /Cleanup-Image /RetoreHealth

  1. To repair an online image using some of your own sources instead of Windows Update, type (there is a space before each of the /)

Dism /Online /Cleanup-Image /RestoreHealth /Source:c:\test\mount\windows /LimitAccess

If you do not specify a /Source for the repair files, the default location for Features onDemand is used, Formore information, see Configure a Windows Repair Source. If you specify more than one /Source, the files are copied from the first location where they are found and the rest of the locations are ignored. You can use /LimitAccess to prevent the DISM tool from using Windows Update as a repair source or as a backup repair source for online images.