Rescue / repair Windows Server installation with command line commands

It seems that most Microsoft solutions only give you the option of repairing your installation with a backup image. This is definately not the only option and not the most streamlined way to do this. You have a fair chance to make it in command line with a few commands.

In the blue boot screen select troubleshooting and command prompt. If needed start with image and select repair computer to get to the command line. Execute the following.

chkdsk c: /f
chkdsk d: /x /f

Try reboot if it works. If not continue below with command prompt.

bootrec /fixmbr

Try reboot if it works. If not continue again below with command prompt.

bcdedit /export C:\BCD_Backup
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
bootrec /RebuildBcd

Try reboot and hopefully you are there. If still not working your next option is to reinstall Windows Server or do more advanced trickery.

Please leave a comment if you have additional information.

All comments and corrections are welcome.

  • tips_and_howtos/rescue_windows_cmd.txt
  • Last modified: 2021/10/24 13:51
  • by