SFC and DISM System Check

Verify the health of a Windows install.

You can verify and clean up any damaged operating system files if you suspect or Windows detects corruption. DISM and SFC verifies the OS files with hashes (SHA256). If the hashes do not match, the file is corrupt. The tool will pull a clean copy online from Windows Update servers or using the SxS store.

You can run these commands while Windows is booted:

dism /Online /Cleanup-image /Scanhealth
dism /Online /Cleanup-image /Restorehealth

If the operations complete successfully, you should reboot. You do not need to read further.

But let's say DISM returned the error: 0x800f081f - The source files could not be found. You can attempt to restore the missing file. Run the following commands in the order below:

dism /Online /Cleanup-Image /AnalyzeComponentStore
dism /Online /Cleanup-Image /StartComponentCleanup
dism /Online /Cleanup-image /Restorehealth

If completed successfully you need to reboot. If DISM fails once again, you may need to use a source image to repair these files. To obtain a complete source image I recommend you use UUP. The source image must be of the same build version/number. For example, if you are running Windows build 18363.418, you cannot repair from a source that is 18363.352. Search UUP for your current build and select the architecture that applies to your system. Once you have obtained your source you should verify which source file format is being used. This is either ESD or WIM. Replace X with the mount point of the image, and use the correct index number in place of #. Mount it and run:

dism /Online /Cleanup-Image /RestoreHealth /Source:[ESD|WIM]:X:\sources\install.[esd|wim]:# /LimitAccess

Sometimes Windows being offline helps. You can access the Recovery Tools command prompt and run:

dism /image:C:\ /cleanup-image /restorehealth
dism /image:C:\ /cleanup-image /restorehealth /Source:[ESD|WIM]:X:\sources\install.[esd|wim]:#

If you've reached this point and still continues to fail, you can dig further. The logs for these tools can be found at:

  • C:\Windows\Logs\CBS

  • C:\Windows\Logs\DISM

The support person may ask for these logs. Copy them to the desktop to zip them.