It is always a good idea to back up your data beforehand!
System file check is a utility built into the Operating System that will check for system file corruption
The sfc /scannow command (System File Check) scans the integrity of all protected operating system files and replaces incorrect, corrupted, changed, or damaged versions with the correct versions where possible. When it cannot repair the damage DISM should be run to fix as many errors as possible.
- Make sure you’ve installed the latest updates for Windows, and then restart your machine. To find out more, read Update Windows.
- In the search box on the taskbar, type command prompt, and right-click or press and hold Command Prompt (Desktop app) from the list of results. Select Run as administrator, and then select Yes.
- Type DISM.exe /Online /Cleanup-image /Restorehealth (note the space before each “/”), and then press Enter. (Note: This step may take a few minutes to start and complete.)
- After you see a message that says, “The operation completed successfully,” type sfc /scannow (note the space between “sfc” and “/”) and press Enter.
- After you see a message that says, “Verification 100% complete,” type exit and press Enter.
From an elevated command prompt, you can run Check, then Scan, but you should always run RESTORE HEALTH
To check the health (You would use /CheckHealth to only check whether the image has been flagged as corrupted)
run Dism /Online /Cleanup-Image /CheckHealth
To scan the health use /ScanHealth to scan the image for component store corruption. This option does not fix any corruption.
run Dism /Online /Cleanup-Image /ScanHealth
To RESTORE health (recommended)
Use DISM /Online /Cleanup-Image /RestoreHealth to scan the image for component store corruption, perform repair operations automatically, and records that corruption to the log file. This generally takes 15-30 minutes depending on the corruption and size of the partition