From Server Core to GUI to… MinShell?
- Written by MITPro
- October 2, 2012 at 3:15 pm
In Windows Server 2008 we were introduced to a revolutionary way to install Windows Server: Server Core.
Server Core may look boring – there’s nothing to it except the command prompt – but to an IT Pro it is really exciting for several reasons:
- It requires fewer resources, so in a virtualization environment you can optimize your environment even more than previously;
- It has a smaller attack surface, which makes it more secure;
- It has a smaller patch footprint, which means less work for us on Patch Tuesdays; and
- We can still use all of the familiar tools to manage it remotely, including System Center, MMC Consoles, and PowerShell.
Despite all of these advantages in my experience a lot of IT Pros did not adopt Server Core. Simply states, they like the GUI (Graphical User Interface) manageability of the full installation of Windows Server. Many do not like command lines and scripting, and frankly many are just used to the full install and did not want to learn something new. I have even met some IT Pros who simply click the defaults when installing the OS, so they always ended up with the full install.
As you can see in this screenshot, the default installation is now Server Core. This is not done to confuse people, but going forward most servers are going to be either virtual hosts or virtual machines, and either way Server Core is (more often than not) a great solution.
Of course, if you do this and did not want Server Core you are still in good shape, because new in Windows Server 2012 you can add (or remove) the GUI interface on the fly. You can actually switch between Server Core and Full (GUI) Install whenever you want, making it easier to manage your servers.
There are a couple of ways to install the GUI from the command prompt, although both use the same tool – DISM(Deployment Image Service Manager). When you are doing it for a single (local) server, the command is:
Dism /online /enable-feature /featurename:ServerCore-FullServer /featurename:Server-Gui-Shell /featurename:Server-Gui-Mgmt
While the Dism tool works fine, one of the features that will make you want Windows Server 2012 on all of your servers now is the ability to manage them remotely, and script a lot of the jobs. For that Windows PowerShell is your friend. The script in PowerShell would be nearly as simple:
Enable-WindowsOptionalFeature –online -Featurename ServerCore-FullServer,Server-Gui-Shell,Server-Gui-Mgmt
It takes a few minutes, but once you are done you can reboot and presto, you have the full GUI environment.
While that in and of itself is pretty amazing, we are not done yet. There is a happy medium between Server Core and Full GUI.
MinShell (Minimum Shell) offers the administrator the best of both worlds. You have the GUI management tools (Server Manager) but no actual GUI, which means that you are still saving the resource, have a smaller attack surface, less of a patch footprint, AND full manageability!
What the product development team has done is simple: they made the GUI tools a Server Feature… in fact, they made it three separate features (see graphic). Under User Interfaces and Infrastructure there are three options that allow the server administrator to customize the visual experience according to his needs.
The Graphical Management Tools and Infrastructure is the Server Manager, along with the other GUI tools that we use every day to manage our servers. It also includes the Windows PowerShell Integrated Scripting Environment (ISE) which allows administrators an easier to create and manage their PowerShell scripts.
The Desktop Experience gives the administrator the full desktop experience – similar to the Windows 8 client OS – including features such as Picture and Video viewers.
The Server Graphical Shell is exactly that: the GUI. In other words we can turn the GUI on or off by using theAdd Roles and Features Wizard (and the Remove Roles and Features Wizard).
Now there are a number of catches to remember:
First of all when you go down to MinShell the Add Roles and Features Wizard is still available, but not in Server Core. Make sure you have this article on hand if you do go down to Server Core.
Next, if you install the full GUI and then remove the components then re-adding them isn’t a problem; however if you install the Server Core installation from the outset then the GUI (and Management) bits are not copied to the drive, which means that if you want to add them later you will need to have the installation media handy.
While hard drive space is pretty cheap, and it is easy to decide to install the full GUI every time and then remove it (so that the bits will be there when you want them). However remember that with Hyper-V in Windows Server 2012 the limits are pretty incredible, and it is entirely possible that you will have up to 1,024 VMs on a host; that means that the few megabytes required for the GUI bits could add up.
Removing the GUI: PowerShell
Sean Kearney, a Microsoft PowerShell MVP, reminded me that there are a couple of ways to achieve the same goals. The Dism tool is one way, but you can also use the ServerManager module. Here’s how you would use that one to remove the GUI:
Uninstall-windowsfeature -name Server-GUI-Mgmt-Infra,Server-GUI-Shell
Whether you opt for the Server Core, Full GUI, or the MinShell compromise, Windows Server 2012 is definitely the easiest Server yet to manage, either locally or remotely, one-off commands or scripts. What I expect admins will be most excited about is the choices. Run your servers your way, any way!