Switching Between the GUI and Server Core in Windows Server 2012
Windows Server Core was a terrific introduction when first introduced several years ago. Most organizations don’t need a full-blown graphical interface for their servers and this was a great option. Of course, a major challenge is configuring server core. This has gotten easier over time, and with Windows Server 2012 we have a new option that makes this super easy: We can build and configure a server with a GUI and then take it away, turning the box into a Server Core installation.
This is possible because the server GUI in Windows Server 2012 is now an optional feature which means it can be installed and removed as necessary.
Switching from GUI Mode to Server Core Mode
To make the transition, open Server Manager and click on Manage – Remove Roles and Features. This will launch the wizard, as seen below in Figure 1.
Select a server from the list. I only have one, as you can see in Figure 2.
The implication here is that if you are running Remote Server Administration Tools (RSAT) on Windows 8, you can remotely make this change.
Clicking Next brings up a list of server roles. I don’t want to change any roles, so I’ll click next which brings us to figure 3.
Scroll down to “User Interfaces and Infrastructure” and expand as I have in Figure 4.
I’ll uncheck Server Graphical Shell. Since there will be no GUI, there is no reason to keep the Graphical Management Tools and Infrastructure feature either. Note that when you uncheck this you may get a prompt about removing the PowerShell ISE. That’s fine to remove.
You are finally presented with a summary, as seen below in Figure 5.
You can decide if you want to reboot when finished or manually handle it later. Click Remove to start the process as seen in Figure 6.
Note: If you are doing this on the server console I recommend closing all other windows and applications before starting this process. The process will require the server to be rebooted. But when the server reboots you will log on to a Server Core installation.
GUI to Server Core: The PowerShell Way
Of course, because this is Windows Server 2012, if you can manage it through the GUI you should be able to manage it from PowerShell. In this situation I can use Uninstall-WindowsFeature. Here’s how I can do the same task but from my Windows 8 machine running RSAT.
PS C:\> Uninstall-WindowsFeature -name PowerShell-ISE,Server-Gui-Mgmt-Infra,Server-Gui-Shell -computer chi-dc03 -Restart
This will uninstall the same features and reboot when necessary. Want to know a bunch of Windows Server 2012 boxes back to Core? It couldn’t be easier.
Switching from Server Core to GUI
Naturally, this process can go the other way as well using either the GUI or PowerShell. If you want to use the GUI you’ll need another Windows Server 2012 running the Server Manager GUI or a Windows 8 client running RSAT.
The procedure is essentially the same, except under Manage, select Add Roles and Features. Select Role-based or Feature-based installation.
As before, select the server and skip the roles. On the Features screen, scroll down and check the boxes for Graphical Management Tools and Server Graphical Shell. (At least, I don’t see any reason not to have one without the other.) If you want the PowerShell ISE back, be sure to check that as well. Kick off the process, reboot, and you’re back to a complete GUI.
Server Core to GUI: The PowerShell Way
The PowerShell way is just as easy as before, except now we use Add-WindowsFeature:
PS C:\> Add-WindowsFeature -name PowerShell-ISE,Server-Gui-Mgmt-Infra,Server-Gui-Shell -computer chi-dc03 –Restart
Note that if you want to do this at the server console, this is the only way you can restore the GUI.
Switching between a full-blown GUI and server core is very easy in Windows Server 2012, and you can even apply the change to multiple machines. Using Server Manager is a pretty simple solution. Remember, you can do this from a Windows 8 box with RSAT. The PowerShell commands lend themselves nicely to workflows. Or, because the process requires a reboot, you might want to set your command up as a one-time scheduled task.
GUI? Server core? Now you can have it all for the price of a reboot.
More in Windows Server 2012
Microsoft Acknowledges New Netlogon Issues On Windows Server Machines
Feb 25, 2022 | Rabia Noureen
How to Fully Patch the PrintNightmare Vulnerability
Jul 9, 2021 | Brad Sams
Understanding Windows Server 2016’s Disaster Recovery Features
Aug 29, 2018 | Michael Otey
What Are Shared Virtual Hard Disk Sets on Windows Server 2016 Hyper-V?
May 26, 2017 | Aidan Finn
What Is the Storage Resiliency of Windows Server 2016?
May 25, 2017 | Aidan Finn
SCARY: “Atom Bomb” Windows Security Hole said to be Unfixable
Oct 31, 2016 | Richi Jennings
Most popular on petri