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.

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

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

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

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

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

The removal of the GUI will now commence.

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

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

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.

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.

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

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.

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.

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

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

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

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

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.

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

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

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