Windows Server 2012 – Install and Turn on GUI from Command Line

32

What happens if you install Windows Server 2012 without the GUI features and then realize that you want to turn on the GUI? For those who are used to GUI based Windows Server administration, seeing a command line interface can be daunting. This guide will help you to go from the command line interface, using PowerShell, to installing and turning on the GUI.

Install the GUI on Windows Server 2012

The first step in this is to enter the PowerShell. At the command line prompt, just enter PowerShell and you will see something like the below:

Windows Server 2012 - Turn on GUI - PowerShell
Windows Server 2012 – Turn on GUI – PowerShell

The next step is to type Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra in order to get the

Windows Server 2012 - Turn on GUI - Install WindowsFeature
Windows Server 2012 – Turn on GUI – Install GUI

You will see a text based installer. This part of the Windows Server 2012 GUI installation is rather easy and there is plenty of time to grab a drink.

Windows Server 2012 - Turn on GUI - Grab a Drink During Install
Windows Server 2012 – Turn on GUI – Grab a Drink During Install

Once this is complete, you do need to reboot the server before the GUI will be turned on. Unless you have something else going on that you need to shutdown first, you can shutdown  and reboot immediately with shutdown -r -t 0 as seen below:

Windows Server 2012 - Turn on GUI - Reboot
Windows Server 2012 – Turn on GUI – Reboot

The system will then reboot and go through the Windows Server 2012 configuration changes.

Windows Server 2012 - Turn on GUI - Configuring Features
Windows Server 2012 – Turn on GUI – Configuring Features

When the system boots, you will see that the GUI is turned on. The Server Manager dashboard is present on login and everything works.

Windows Server 2012 - Turn on GUI - Installation Successful
Windows Server 2012 – Turn on GUI – Installation Successful

Conclusion

If you are accustomed to the Windows Server 2012 GUI, you may be a bit nervous seeing a command line only interface. Fear not, the guide above uses less than 90 characters of typing to install and turn on the GUI. In total this took me only a few minutes to do the run-through. Also, this guide assumed one has a command line only installation. If you already have the GUI installed, you can use SConfig to turn on the GUI easily.

32 COMMENTS

  1. I’m just a day to early, ended up re-installing yesterday before your article.

    Anyhow, the big question is how do you enable WinRM sucesfully so you can actually administer the damn server from a remote W2K12 machine?

    Running W2K12 inside a VM and want to adminsiter it from the W2K12 Hypervisor server admin, it can see the remote W2K12 server but “WinRM negotiation errors” are preventing me from doing anything with it!

  2. Which version of WS2k12 should I use? Standard, Essentials, Foundation of Storage Server?

    I plan to only use it as a fileserver.

  3. Along these lines, the following is from the release notes:

    If you upgrade from a Full installation of Windows Server® 2008 or Windows Server® 2008 R2 to Windows Server 2012 in Server with a GUI mode, and then switch Windows Server 2012 to Server Core mode, conversion back to Server with a GUI mode will fail.

    To avoid this, delete these registry keys with the following commands:

    reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{bc2eeeec-b77a-4a52-b6a4-dffb1b1370cb}

    reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{57e0b31d-de8c-4181-bcd1-f70e880b49fc}

    reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{8c9dd1ad-e6e5-4b07-b455-684a9d879900}

    After running these commands, restart the upgrade

  4. For servers not connected to the internet, what is the syntax for specifying a source (the cd).
    The above only works for me if the server has an internet connection.
    Thanks very much…

  5. Hi Stuart, to specify the server 2012 disc you need to add ” -source wim:d:\sources\install.wim:4″ assuming your disc drive is the d: drive.

    So it should look like this:
    install-windowsfeature server-gui-shell, server-gui-mgmt-infra -source wim:d:\sources\install.wim:4

  6. Thanks Alex… teh CMS Line is very usefull… i have assume the Disc drive as E and its work well…

  7. Just as a note you will need an internet connection otherwise you will get this error:

    Install-WindowsFeature : The request to add or remove features on the specified server failed.

  8. Thanks a lot, it worked for me and every time i install it i brows to this form and complete the installation

  9. I received this error during the installation, any help?

    Install-WindowsFeature : The request to add or remove features on the
    specified server failed.
    Installation of one or more roles, role services, or features failed.
    The source files could not be downloaded.
    Use the “source” option to specify the location of the files that are required
    to restore the feature. For more information on specifying a source location,
    see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f0906
    At line:1 char:1
    + Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (@{Vhd=; Credent…Name=localh
    ost}:PSObject) [Install-WindowsFeature], Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Wi
    ndows.ServerManager.Commands.AddWindowsFeatureCommand

    Success Restart Needed Exit Code Feature Result
    ——- ————– ——— ————–
    False No Failed {}

  10. What the Core version was loaded from the trial version iso file, named
    9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVER_EVAL_EN-US-HRM_SSS_X64FREE_EN-US_DV5 (1).ISO

  11. sir,
    thanks for providing online server trouble shooting in various platform of server.
    sir tell me how to upadte RAD Hat linux F Secure antivirus update m,annuly which is not on intenet.

  12. If you haven’t read “ALL” the replies under this article then.. well… you need to go back and do it. Why? your answer probably is sitting in a comment or reply above (or below).

  13. Success : false restart Needed:no exit code: failed feature result:
    This error comes and all other text In red colour : install-windows feature : the request to add or remove features on the specified server failed.

    Please help me with it

  14. I get no error, everything seems to work correctly, but when I reboot I just get powershell. Everything is there, I can run explorer, but it doesn’t load the shell, just gives me an explorer window view of the current directory. Any tips? I tried removing the registry keys above as mine was an upgrade.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.