Shouldn't I check health before?
DISM /online /cleanup-image /checkhealth
The
Dism /Online /Cleanup-Image /CheckHealth
command uses Windows Update to see if the system files are healthy, repairable, or non-repairable.
Repair a Windows Image
What the article doesn't mention it that the
Dism /Online /Cleanup-Image /RestoreHealth
command
also will report whether it detected corruptions so if it turns out that it did, it will report whether it was able to successfully repair them. The difference is that, if you're interested in trying to investigate what's caused the corruptions, then you can't always do these kinds of investigations after the corruptions have already been repaired. But then, in a lot of cases you don't really need to investigate, as you can just blame Windows instead. Windows is, and always has been, a funny OS above anything else so, the day when funny OS stops being funny, prepare for cataclysmic event.
Usually, if the
sfc /scannow
command didn't detect any corruptions, it means that there aren't any, but sometimes it can happen that there still are, in which case
Dism /Online /Cleanup-Image /RestoreHealth
should do the trick. Only if problems like this persist after, that's when other troubleshooting methods such as, e.g., trying to repair Windows via an in-place upgrade will typically be recommended next. Some also recommend to just skip the
sfc /scannow
simply for the fact that it doesn't always find the corruptions if present. Even so,
sfc /scannow
takes much less time to finish compared to
Dism /Online /Cleanup-Image /RestoreHealth
so, more often than not,
sfc /scannow
helps to save valuable time still nevertheless, i.e. due to the simple fact that it usually is already sufficient to remedy the problem.