Optimizing Your Cloud Footprint: The Minimal Server Interface in Windows Server 2012

The Minimal Server Interface can provide a happy medium when Server Core is challenging (due to lack of connectivity for remote administration), and reduces the server footprint. I find customers are generally unsure as to what UI elements are available in the Minimal Server Interface. Here is some information to clear this up and provide a bit more detail than I found in any one place.

What can you run in the Minimal Server Interface?

You can still access many UI management elements in the Minimal Server Interface, including.

  • You can launch Server Manager, simply by typing ServerManager
  • You can launch PowerShell from the default command prompt simply by typing PowerShell.
  • You can launch many of the existing MMC snap-ins you are likely familiar with, such as Services (Services.msc) and Event Viewer (Eventvwr.msc)

For a full list of Control Panel command line syntax, see Control Panel Applets and Command Line Launch Options for Windows 8 and Windows Server 2012

NOTE: Not all Control Panel shortcuts will be functional, but a surprising number will launch just as they would in the full GUI.

PowerShell for Switching from Full Server to Minimal to Core (and back again)

In Windows Server 2012, you can move between UI levels without reinstallation and in some cases, without a reboot. The one challenge is the move from Server Core back to Full Server. The process for moving between UI levels in Windows Server 2012 is shown below.

Full Server to Server Core

Remove-WindowsFeature Server-Gui-Mgmt-Infra -Restart

Full Server to Minimal Server Interface

To remove the server graphical shell, which reduces the GUI server installation to a Minimal Server Interface installation, run:

Remove-WindowsFeature Server-Gui-Shell

Server Core to Minimal Server Interface

Install-WindowsFeature Server-Gui-Mgmt-Infra -Restart

Server Core to Full Server

Adding Server Shell components to a Windows Server 2012 Core installation is a more involved process than the one line it takes to remove the GUI layers to go to Minimal Server Interface and then finally Server Core. This is due to the fact that in a Server Core installation the actual binaries for Server Shell do not reside on the local computer. This is how a Server Core installation achieves a smaller footprint in the first place. If you run this PowerrShell cmdlet

Get-WindowsFeature

you can see the install state of features in the Install State column (see image below). Removed means the binaries are not on the local drive.

Windows PowerShell cmdlets and viewing the Install State column. The Removed value indicates the binaries that represent the feature do not reside on the hard drive. Therefore, you need to add the binaries to the installation before you can install them. Another indicator that the binaries do not exist in the installation is the error you receive when you try to install a feature that is removed. The Install-WindowsFeature cmdlet will chug along as though it is installing the Full UI, hang at around 60-65 percent, and then showing you this:

image

Provide Access to Installation Media

First, you need your WS2012 installation media to get access to the binaries into the installation. Windows installation files are stored in WIM files that are located in the \sources directory on the installation media. There are actually two different WIM files on the media. For this this process is INSTALL.WIM is the file we are interested in. Once you have mounted the Windows Server ISO to your VM running Server Core, get the drive letter for the install media. You can do this in PowerShell with:

Get-PSDrive

The ISO will be pretty easy to spot based on size (E: in my case)

image

Find and Mount the Appropriate INSTALL.WIM

Get the index of the image with the GUI (the Full Server in Windows Standard or Datacenter version).

Dism /get-wiminfo /wimfile:e:\sources\install.wim

In this case, 2 or 4 would be the appropriate index, depending on whether you have Standard or Datacenter installed. I have Windows Server 2012 Standard installed, so Index: 2 will be the image I need to mount.

image

Now mount that image

dism /mount-wim /WimFile:e:\sources\install.wim /Index:2 /MountDir:c:\mountdir /readonly

Now you can reinstall the Full Server GUI. Notice here we install the equivalent of minimal interface + addition UI to achieve full server

Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Restart –Source c:\mountdir\windows\winsxs

 

Please leave questions and feedback in the comments section below this post.

3 thoughts on “Optimizing Your Cloud Footprint: The Minimal Server Interface in Windows Server 2012

  1. Profile photo of Joe GasperJoe Gasper

    You can skip mounting the install.wim file, point directly at the file:

    Install-WindowsFeature Server-Gui-Shell -Source:wim:d:\sources\install.wim:2

    (The number at the end is the image index.)

    And if you decide to increase the GUIness of a system after it’s been running a while, make sure you are maintaining an updated install.wim file. When your system has newer patched files than in your source, you’ll have problems with the feature add. See:

    http://blogs.technet.com/b/joscon/archive/2013/06/24/3532554.aspx

    Adding the full GUI is one feature where we’ve encountered this problem.

    I appreciate systemcentercentral, thanks!

    -Joe

  2. Pingback: Minimal Server Interface for Windows Server 2012 | Anthony's Blog

Leave a Reply