The Correct Order:
-
DISM.exe /Online /Cleanup-Image /RestoreHealth(Always run this first to fix the underlying Windows update files). -
sfc /scannow(Run this second so it can use those fixed files to repair your actual operating system). -
chkdsk C: /f /scan(Run this third to clean up the file system structure after files have been modified). - defrag D: /D /U /V (for raid drives)
- defrag D: /X /U /V (for regular drives)
-
defrag C: /O(Run this last to optimize the drive blocks and TRIM the free space after all repairs are complete).