In this tutorial you will learn how to repair Windows Server 2019 installation with DISM. If you’re experiencing problems with your Windows Server 2019 installation, using the DISM /restorehealth can help repair it. DISM is a command-line tool that can scan and fix issues with Windows images, including those used by the Server operating system. This process can be done by following a few simple steps such as opening an elevated command prompt, running the DISM tool, waiting for the process to complete, and restarting your system.
Remember to always have a backup. Or if it’s a virtual machine at least a snapshot.
1.Lets get started by Opening up CMD as administrator and running the following:
dism /online /cleanup-image /scanhealth
2. Once /scanhealth is complete, run the following.
dism /online /cleanup-image /checkhealth
3. Now lets mount your Windows Server 2019 ISO as a drive. Take note of your mounted drive letter because you may need to change it to reflect it within this next command. Start elevated command prompt.
dism /online /cleanup-image /restorehealth /source:WIM:d:\sources\install.wim:2 /limitaccess
4. Now run the following to find and repair additional corruption
5. Hopefully all has been repaired restart your server, then run some windows updates and you should be good to go.