Windows 10 – Repair System Files

email me

Use dism to repair system files, restore configs, and fix OS anomalies.

 

Repair a Windows Image

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.


To check if an image is repairable

Scan the image to check for corruption. This operation will take several minutes. At a command prompt, type the following command:

Dism /Online /Cleanup-Image /ScanHealth

Check the image to see whether any corruption has been detected. At a command prompt, type:

Dism /Online /Cleanup-Image /CheckHealth

When you use the /CheckHealth argument, the DISM tool will report whether the image is healthy, repairable, or non-repairable. If the image is non-repairable, you should discard the image and start again. If the image is repairable, you can use the /RestoreHealth argument to repair the image.

 

To repair an image

Use the /RestoreHealth argument to repair the image. To repair an offline image using a mounted image as a repair source, at a command prompt, type the following command:

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

Or to repair an online image using some of your own sources instead of Windows Update, type:

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

 

Notes

You can also use the older command:

sfc /scannow