August 31, 2016

Windows 2012 R2 Remote Desktop Is A Black Screen With Command Prompt Only

If you ever find yourself in a situation where Windows Server 2012 R2 decides to spontaneously switch from regular GUI Windows to Windows Server Core, here’s how you switch it back.

I was working with a vendor on a software sandbox installation and near the end of the day after hours of work, we rebooted one of the servers we were working on. When it booted back up and we connected via remote desktop, all we saw was a black screen. No Start menu. Nothing. We had logged in with a user account created specifically for this sandbox install. It had administrative rights. So then I decided to log into this server via remote desktop using my credentials (also administrative) and I get pretty much the same thing, except now I have a command prompt window sitting on top of a black screen, again with no Start menu.

windows2012R2screenshot

I rebooted the server hoping it would fix the problem, but knowing it probably wouldn’t. I logged in via remote desktop again but this time I paid close attention and noticed “Alternate shell” flash quickly on the screen just before the command prompt appeared. Well at least I now had a clue to work with.

I decided to see if I could browse to the server over the network, which I was able to do. I looked to see if explorer.exe was in C:\Windows, it was not. I copied it from a different server and rebooted this server again. Logged in again, and still get the black screen and command prompt. That’s when I started Googling various word combinations. I quickly determined that this Windows Server 2012 R2 instance had converted itself from Windows GUI to Windows Core. I have no idea how that happened. From my searching, I found many different options to fix this problem, some involving Powershell or Server Manager, but none worked for me. Then I finally stumbled across a command that worked. If you are in the same bind I was, run this in the command prompt:

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

The command will take a while, but when it is complete all your GUI goodies will return. After a reboot and a long wait you will get your Start menu back!

Sell Art Online
Tweet about this on TwitterShare on Google+Share on FacebookShare on RedditPin on PinterestShare on TumblrDigg thisShare on StumbleUponShare on LinkedInEmail this to someone

Please share your thoughts