Windows Server 2012 R2 only boots to command prompt
A week back I had encountered a very strange behavior with one of our servers running on Windows Server 2012 R2. My colleague was trying something on the server where he had to remove the .Net Framework 3.5 or so, but in the midst of all this, he restarted the server and the sever boots only to command prompt. Upon checking the server, I figured out that it was doing all the basic functions that were allowed to do while being on a command prompt window. But it was not opening Servermanager or Powershell at all. This made me suspicious on it’s behavior.
I did a bit of research on this issue and found out from a Technet blog that for some reason, the GUI installation of the server was undone and it was now acting like a core server installation (where only command prompt operations were possible). Sounds somewhere like LINUX right? Yes that’s what I thought too. There were instructions on how to get the GUI part of the server back.
We are asked to run the following command from the command prompt that is open upon logging into the server:
Dism /online /enable-feature /featurename:Server-Gui-Mgmt /featurename:Server-Gui-Shell /featurename:ServerCore-FullServer /all
This will install the GUI features and all the requisites for those features. The installation itself will take quite a while. Once the installation is complete, reboot the server with the command “shutdown /r /t 0“. The server also prompts to be restarted once the installation is complete. However I chose to run the command after hitting a “No” to the restart option. The GUI features were installed back after the restart.