16

I'm sorry but i'm stuck in figuring out a problem i'm facing here. I removed the AD feature from server manager and after rebooting, my server 2012 gui wasn't there anymore. There's only command prompt to deal with. I tried to enable back gui based on threads i've found. I did SConfig but option no.12 which is to restore gui is not there. I tried running powershell but it stated "powershell is not recognized as internal or external...". I change my path to c:\windows\system32\windowspowershell\v1.0 and tried running powershell just to find the same error message. So how can i enable back the gui feature of my server 2012?

mfmz
  • 169
  • 1
  • 1
  • 6

3 Answers3

26

Is explorer simply not starting? have you tried typing explorer.exe in the command prompt window? I guess this isn't the case you wouldn't normally get a command prompt when logging in. It sounds like somehow the shell has been removed, effectively giving you a server core install, in which case try issuing the following from the command prompt. This should re-enable the shell if it has been somehow disabled.

Dism /online /enable-feature /featurename:Server-Gui-Mgmt /featurename:Server-Gui-Shell /featurename:ServerCore-FullServer
Bryan
  • 7,538
  • 15
  • 68
  • 92
  • Yes. explorer.exe doesn't start as well. As far as I'm concerned, i only removed the AD feature without messing around with the shell. After rebooting, the gui went missing and I couldn;t even access the powershell to restore the gui. – mfmz Dec 01 '12 at 13:01
  • Okay have you tried running the `dism` command I suggested? If the shell has been removed (which sounds likely, although I've no idea why), then the `dism` command should sort it out. – Bryan Dec 01 '12 at 13:18
  • Have you managed to resolve it? Your now deleted comment had me stumped. – Bryan Dec 01 '12 at 13:51
  • Yes I did ! I typed the command wrongly at first. After correcting it, it worked. I deleted my comment because I wrote it gave me an error, which is caused by own typing mistake. Thanks ! Great help ! – mfmz Dec 01 '12 at 14:14
  • Glad to hear you're up and running again, and you're welcome. – Bryan Dec 01 '12 at 14:24
  • 1
    @user1867016 If the answer resolved your issue, be sure to accept it by clicking the outline of the check mark next to it. This indicates to others that the issue is resolved. Welcome to Server Fault! – Michael Hampton Dec 01 '12 at 15:12
  • 1
    Dude you rock! I had the same issue on my Windows 2012 server and was after I uninstalled .NET Framework 4.5, rebooted. Then I re-installed the .NET Framework feature and rebooted. This caused my server to boot into recovery mode once I logged in. This command definitely worked and allowed me to get the GUI interface I was using. The only issue was that once I was able to login I had to go into the Roles and Features wizard and I added back under User Interface and Infrastructure both options for Graphical Management Tools and Infrastructure along with Server Graphical Shell. I'm not sure how –  Mar 14 '13 at 21:01
16

FYI, when this happened to me, I kept getting an Error 50 when using the command above. I had to add an /all to make it work. Once I did that, it worked just fine.

Dism /online /enable-feature /all /featurename:Server-Gui-Mgmt /featurename:Server-Gui-Shell /featurename:ServerCore-FullServer
Jim Simmons
  • 161
  • 1
  • 2
1

Below worked for me

Dism /online /enable-feature /featurename:Server-Gui-Mgmt /featurename:Server-Gui-Shell /featurename:ServerCore-FullServer /all
Hrishi
  • 67
  • 7
  • 4
    While this code may answer the question, explaining *how* and/or *why* it solves the problem would improve the usefulness and long-term value of the answer. – Anthony Geoghegan Jan 06 '16 at 11:18
  • Yup. Sometimes when components break, you have to add the parameter /all. – Nathan Jul 07 '17 at 22:37