How to fix corruptions in the Windows Operating System

Sometimes errors, system reliability and performances issues can be down to corruptions in the Windows Operating System, whether for PC/laptop or server.

There are some commands in Windows that can try and fix these issues or corruptions. Below are the commands and what they do

System File Checker

System File Checker is a utility in Windows that checks for problems with files on your computer and tries to fix them. To run the checker with the repair option, please do the below

  1. Open the command prompt as an administrator
  2. Run sfc/ scannow

This will take some time. If corrupt files and found and fixed, please restart the device. Then run the scan again to confirm all issues have been fixed

Repair Windows Image with DISM

Sometimes the Windows Image itself can become unhealthy. In this case it is best to try and run the DISM repair command to do this

  1. Open the command prompt as an administrator
  2. Run the command DISM.exe /Online /Cleanup-image /Restorehealth
  3. Once complete run the command SFC /scannow to resolve any further issues

DISM Offline Repair

If the DISM command fails, sometimes an offline image is required such as an ISO file of a Windows Image. The DISM RestoreHealth command requires internet access to download the latest files. So if it can’t retrieve those files for what ever reason, an offline image file may solve the issue.

  1. Get a copy of the Windows Image/ISO. For Windows 10 and 11 this can be downloaded directly from Microsoft
  2. Windows 10 – https://www.microsoft.com/en-us/software-download/windows10ISO or Windows 11 – https://www.microsoft.com/en-us/software-download/windows11
  3. You will need to find the right matching Windows version to the one that is installed. For example if the install image file is on the D drive run the following to reveal the image versions and their index numbers – Get-WindowsImage -ImagePath “D:\sources\install.wim”
  4. If for example you have Windows 11 Pro installed and Windows 11 Pro shows as being index 6, we will need to use this number on the next step
  5. Next run the following for WIM images DISM /online /cleanup-image /restorehealth /source:WIM:D:\sources\install.wim:6 /limitaccess
  6. Or for ESD images run DISM /online /cleanup-image /restorehealth /source:ESD:D:\sources\install.esd:6 /limitaccess
  7. Finally run SFC /scannow to check for any other errors