Repair a Windows Server 2016 installation

I recently ran into an issue where a Server 2016 ran out of space and parts of it became corrupt. Running sfc /scannow showed that errors were found and could not be repaired. The corruption caused some odd behaviour on the server.

I tried the below commands which looked promising but SFC /scannow reported corruption and mentioned that there were some files it could not repair. Even after a reboot the server was still behaving very odd.

1.  Run dism /online /cleanup-image /scanhealth
2.  Run dism /online /cleanup-image /checkhealth
3.  Run dism /online /cleanup-image /restorehealth
4.  Mount the Windows Server 2016 ISO as a drive (E: in this case)
5.  WIM number is usually 1 for server and 2 for desktop
5.  Run dism /online /cleanup-image /restorehealth /source:WIM:E:\sources\install.wim:1 /limitaccess
6.  Run sfc /scannow
7.  Run Windows Update

If the above fails perform a repair install of windows and choose “Keep personal files and apps”. This will preserve the installed apps and settings. Run a windows update after to bring it up to date.

This entry was posted in Microsoft and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *