How to turn the GUI on and off on Windows Server 2012

There is a Windows Server edition which takes less attention that it deserves. This is the Microsoft Windows Server Core. It has only a command prompt to administrate the server, but runs several roles and has many benefits.

Server Core is capable of the following server roles:

  • Active Directory (AD)
  • Active Directory Lightweight Directory Services (ADLDS)
  • DHCP Server
  • DNS Server
  • File Services
  • BITS Server
  • BranchCache
  • HyperV
  • IIS
  • Printing Services
  • Streaming Media Services
  • iSCSI
  • Load Balancing
  • MPIO
  • qWave
  • Telnet
  • Unix Migration
  • Active Directory Certificate Services

The purpose of using the Server Core instead of the Standard or Enterprise edition is the following:

Benefit Description
Reduced Servicing Because Server Core installs only what is required for a manageable DHCP, File, DNS, Media Services, and Active Directory server, less servicing is required.
Reduced Management Because less is installed on a Server Core-based server, less management is required.
Reduced attack surface Because there is less running on the server, there is less attack surface.

A very simple usage example is, if you want to create a virtualization environment based on HyperV. Under HyperV Server you do not need a full Windows Server.

But using windows core server could lead to problems. For example there are some roles which needs GUI. In the previous versions you had to reinstall your Server but with the current release which is 2012 you can install GUI with a simple powershell script. You need to open a powershell console (even from remotely) and run the following scripts:
Import-Module Dism
Enable-WindowsOptionalFeature –online -Featurename ServerCore-FullServer,Server-Gui-Shell,Server-Gui-Mgmt

It takes a few minutes and after a reboot you have the full GUI environment.

These abilities are working in both ways. So if you can better manage a WinServer via GUI, you can simply install it as a normal server with GUI and after setting up all the services, roles, you can remove the GUI.
The needed PowerShell script is the following:
Import-module servermanager
Uninstall-windowsfeature -name Server-GUI-Mgmt-Infra,Server-GUI-Shell


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s