Switch Windows Server 2012 R2 between Core and Full Installations

Overview

Graphical user interfaces consume a lot of system resources. For most servers, those resources could be better utilized serving what ever service the host was deployed for. They also have a tendancy to create a lot of security holes, for which an almost constant stream of patches are required to fix. To add insult to injury, the GUI goes unused for most of the server’s life, which begs the question “Why are we even installing it?” Well, that’s because up until Windows Server 2008, Microsoft has always forced us to have one on our servers.

With the release of Windows Server 2008, Microsoft finally decided to give us the option of installing the operating system without a grahpical interface. The problem was, unlike Linux and Unix, one could not add the GUI later on if needed, or remove one after it was no longer necessary to have. This meant that if your server’s requirements changed, you had to start all over again with a new installation.

Windows Server 2012 changes all of that. We now can switch between core and full installation, and we can do so on-the-fly. There’s really no more reason why, you should be using a full installation for a server, unless it’s due to an installed application’s or role’s requirements. Unfortunately, there are still a few roles that require the GUI to be installed.

Convert Full to Core

  1. Log onto the server with an account that has administrative permissions.
  2. If it isn’t already open, launch the Server Manager console.
    Launch Server Manager
  3. From the Server Manager console, click the Manage menu.
  4. Click Remove Roles and Features.
    Remove Roles and Features
  5. On the Before You Begin screen, click Next.
  6. On the Select Destination Server screen, ensure the server is selected in the server pool, and then click Next.
  7. On the Remove Server Roles screen, click Next
  8. On the Remove Features screen, scroll down the list until you see User Interfaces and Infrastructure and expand it.
  9. Uncheck Graphical Management Tools and Infrastructure and Server Graphical Shell, and then click Next.
    Remove Roles and Features
  10. On the Confirmation screen, review the changes and then click Remove.
  11. When the removal process completes, click Close. The server will now need to be rebooted. During the reboot phase, the remaining components will be removed. Do not power off the server.
  12. After the server reboots, log back in.
  13. Once you’re logged in, you’ll notice that only a command-prompt window is open. You have successfully removed the graphical interface from Windows Server 2012 R2.
    Windows Command-Line

Convert Core to Full

  1. Log onto the server with an account that has administrative privileges.
  2. Check to see if any graphical user interface components are installed. 
    Get-WindowsFeature -Name "Server-Gui-Mgmt-Infra","Server-Gui-Shell"
    

    The output should look like the following, unless you are running in a minimal install, where only Graphical Management Tools and Infrastructure is installed, giving the admin access to Server Manager in server core.
    PowerShell: Get-WindowsFeature output

  3. We can that no components are installed, in the figure above. Now we need to install both of the features listed above.
    Install-WindowsFeature -Name "Server-Gui-Mgmt-Infra","Server-Gui-Shell"
  4. When the features are installed, a warning will be displayed telling you that the server must be restarted. Go ahead and restart the server now.
  5. When the server completes the reboot process, log in. You should now have a fully functional graphical user interface presented to you.
    Windows Server 2012 R2 Graphical User Interface

Conclusion

Being able to switch between the two installation types at any time makes it easier to justify using the Core installation. A full installation is a lot easier to configure than a core installation, so ideally you will intially install the GUI with Server 2012 R2. Once the server is fully configured and ready for production, remove the GUI. We can do all of the administrative work remotely from our Windows 8.1 workstations, as is best practice.