Open Command Prompt as Administrator.
Run the following command:
DISM.exe /Online /Cleanup-image /Restorehealth
Note that DISM uses Windows Update Services to repair itself – If it fails you can download from another PC using the following command.
DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess
Replace the C:\RepairSource\Windows placeholder with the location of your repair source.
Once done – run a disk scan in command prompt using the following code:
Close the command prompt and run windows updates again.
(Personally, I will always reboot the server after the disk check but it’s not always possible).
DISM creates a log file found here: (%windir%/Logs/CBS/CBS.log) that captures any issues that the tool found or fixed.
%windir% is the folder in which Windows is installed.
For example, the %windir% folder is C:\Windows.