Very recently, I came across an issue with Windows Server 2012 R2. When I accessed the server using RDP, only thing I can see was the command prompt and the mouse cursor. GUI was corrupt/missing. I was then able to recover the GUI using the below command:
Dism /online /enable-feature /all /featurename:Server-Gui-Mgmt /featurename:Server-Gui-Shell /featurename:ServerCore-FullServer
After a restart my machine came back online again.
You can also install using the powershell command:
Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra