Windows Server 2012 GUI went missing after removing features

Today morning I have come across an issue with one of the Windows 2012 machine of my client. The GUI went missing after removing ASP.NET 4.5 and a restart after that. The only thing I can see was the command prompt and the mouse cursor. I have researched on various ways to recover the situation and finally the following method gave back the GUI

Ran the command from the command prompt and it added the missing GUI features back. After a restart my machine came back online again.

You may also try the following command to restore the GUI back:

Dism /online /enable-feature /all /featurename:Server-Gui-Mgmt /featurename:Server-Gui-Shell /featurename:ServerCore-FullServer

gui