Primary Computer Service, Inc.

Serving Houston Since 1984!

NOW HIRING

Book Service Call Now

713-827-1300

DISM and SFC System Repair

Windows 10 System Repair

Repair system file corruption with the following commands in the order listed from an elevated command prompt.

  • DISM.exe /Online /Cleanup-image /Scanhealth
  • DISM /Online /Cleanup-Image /RestoreHealth
  • DISM.exe /online /cleanup-image /startcomponentcleanup
  • SFC /Scannow

Microsoft DISM Docs

 

Error Recovery:

0x800f081f - The source files could not be found.

  • Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077
  • Run from elevated cmd box: DISM /Online /Cleanup-Image /StartComponentCleanup
  • Run from elevated cmd box: DISM /Online /Cleanup-Image /AnalyzeComponentStore


You can use Group Policy to specify a Windows image repair source to use within your network. The repair source can be used to restore Windows features or to repair a corrupted Windows image.

Features on demand enables you to remove an optional feature from a Windows image and then restore it later. You can disable optional features and remove files associated with those features from a Windows image using the Deployment Image Servicing and Management (DISM) tools.

When you use the /Remove argument with the DISM /Disable-Feature option, the manifest files for the feature or Server role is maintained in the image. However, all other files for the feature are removed. This enables you to store, download, and deploy smaller images without losing features. Once the image has been deployed, users can enable the feature on their computers at any time by using features on demand to retrieve the required files from the repair source. For more information, see Enable or Disable Windows Features Using DISM.

Automatic corruption repair provides files to repair Windows if the operating system has become corrupted. Users can also use a specified repair source on your network or use Windows Update to retrieve the source files that are required to enable a feature or to repair a Windows image.

Repair a Windows Image

Repair a Windows image using DISM. You can repair 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.

For a quick check of an online image, you may be able to use the command: sfc /scannow to scan and repair files.

For a more extensive check that can repair issues with the store, use DISM /Cleanup-Image.

Is Image Repairable?

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

Dism /Online /Cleanup-Image /ScanHealth

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

Dism /Online /Cleanup-Image /CheckHealth

When you use the /CheckHealth sfc 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. For example, 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

If you do not specify a /Source for the repair files, the default location for Features on Demand is used. For more 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.
Primary Computer Service, Inc.
Copyright Ⓒ 2020 [Primary Computer Service, Inc]. All rights reserved.
Revised: 09/07/20