LOGO

Turn Off GUI in Windows Server 2012 | Enable GUI

June 6, 2012
Turn Off GUI in Windows Server 2012 | Enable GUI

Server Core and the Evolution of Management Options

Initially, the release of Server Core presented a challenge for many Windows administrators. Its exclusive reliance on the command line interface led to widespread avoidance.

However, this limitation was addressed with the introduction of Windows Server 2012. This version brought about a significant shift by enabling a hybrid mode of operation.

Understanding the Hybrid Mode

The hybrid mode in Windows Server 2012 allowed administrators to leverage both command-line tools and a graphical user interface (GUI) for server management.

This flexibility broadened the appeal of Server Core, making it a viable option for organizations seeking a reduced footprint and enhanced security.

Consequently, administrators could now transition to Server Core without completely abandoning familiar GUI-based management techniques.

Benefits of Server Core

  • Reduced attack surface due to fewer installed components.
  • Lower resource consumption, leading to improved server performance.
  • Simplified patching and updates.

The hybrid mode effectively bridged the gap between the efficiency of Server Core and the convenience of a GUI, fostering wider adoption.

This evolution demonstrates Microsoft’s responsiveness to user feedback and its commitment to providing versatile server management solutions.

Disabling the Graphical User Interface

Within Windows Server 8, the GUI has been implemented as a “Feature,” aligning with the modular design found in recent Windows Server Operating Systems. Consequently, its removal is a straightforward process. Begin by launching the Server Manager application.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-1.jpg

Navigate to the Manage menu and then select the option to Remove Roles or Features.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-2.jpg

Proceed past the introductory page by clicking “Next.” Then, choose your server from the available server pool and click “Next” again.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-3.jpg

As the GUI isn’t categorized as a Role, simply click “Next” once more to bypass the Roles selection section.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-4.jpg

On the Features page, deselect the checkbox associated with “User Interfaces and Infrastructure.” Subsequently, click “Next.”

how-to-turn-the-gui-off-and-on-in-windows-server-2012-5.jpg

Now, select the “Restart Destination Server” checkbox and then click “Remove.”

how-to-turn-the-gui-off-and-on-in-windows-server-2012-6.jpg

The removal of the GUI will now commence.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-7.jpg

Following the removal of the necessary binaries, your server will automatically undergo a reboot process.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-8.jpg

Upon restarting and logging in, access to the server will be limited to the command line interface.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-9.jpg

Restoring the Graphical User Interface

If the GUI has previously been disabled, the process for re-enabling it involves utilizing the SConfig tool. Begin by entering "SConfig" into the command line interface and pressing the Enter key.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-10.jpg

Observe the options presented near the bottom of the screen. Option “12” is designated for GUI restoration. Input "12" and then press Enter to proceed.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-11.jpg

A warning message will appear, indicating that enabling the GUI necessitates a system reboot. Confirm this action by selecting the "yes" button.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-12.jpg

This initiates the DISM process, which begins installing the necessary binaries for the GUI shell. The system will prepare for the graphical interface to be re-established.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-13.jpg

Upon completion, you will be prompted to restart the computer. Type “y” and press Enter to initiate the reboot process and finalize the GUI restoration.

Disabling the GUI via PowerShell

The graphical user interface (GUI) can be disabled more rapidly using a PowerShell cmdlet than through the GUI itself. Begin by opening Server Manager, then selecting Tools, and finally launching PowerShell.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-14.jpg

The Remove-WindowsFeature cmdlet is utilized to remove the GUI feature.

Remove-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Alternatively, as Remove-WindowsFeature functions as an alias, the following command can also be employed:

Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

how-to-turn-the-gui-off-and-on-in-windows-server-2012-15.jpg

The removal process will commence shortly after pressing the Enter key.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-16.jpg

Upon completion, a notification will appear, indicating that a server restart is required to finalize the changes. This restart can be initiated directly from the PowerShell window using the following command:

Shutdown –r -t 0
how-to-turn-the-gui-off-and-on-in-windows-server-2012-17.jpg

Following the restart, only the command-line interface will be available for server administration.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-18.jpg

The server will then boot into a command-line only environment.

Restoring the GUI with PowerShell

Initially, access to PowerShell is required. Simply type "PowerShell" and press the Enter key to launch the environment.

how-to-turn-the-gui-off-and-on-in-windows-server-2012-19.jpg

The next step involves utilizing the Add-WindowsFeature cmdlet to reintroduce the necessary components.

Add-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

This command functions identically to its alternative:

Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

how-to-turn-the-gui-off-and-on-in-windows-server-2012-20.jpg

Upon completion of the feature installation, a server restart is necessary. This can be initiated using the Shutdown command.

Shutdown –r -t 0
how-to-turn-the-gui-off-and-on-in-windows-server-2012-21.jpg

Following the server reboot, the GUI will be restored and accessible.

#Windows Server 2012#GUI#disable GUI#enable GUI#server management#command line