Minimal Server Interface…a better Core for 2012(R2)?

Hello everyone. Today I’ll be talking a little bit about Windows Server Core. Back in the Windows 2008 days, I used to have a couple of Windows Core servers that were primarily tools/utility servers and even ran Openfire on one for years. When I talk about Core servers with many Windows Server Admins and Engineers, it’s usually met with a good amount of skepticism and memories of that time years ago when they tried Core and it didn’t work out. While that may have been true before, consider trying the new Windows 2012/2012R2 Minimal Server Interface (MSI).

So, why would should you care about Minimal Server Interface? In short, MSI gives you some of the benefits of Server Core (reductions in patching, storage, CPU, attack surface, etc), while still providing many of the GUI management tools of Full Server (mmc, Hyper-V console, Server Manager, etc).

In addition to these benefits, and perhaps the most important, is that Windows 2012 and above support the ability to begin at Core or Full GUI and change at will to Core, Full GUI, or MSI. This functionality is critical in that it means you can troubleshoot a problem with the remote tools (as before) *or* temporarily install the Full GUI. When finished with troubleshooting the issue, you can then simply remove the GUI components.

So, here’s how it works.

Windows 2012 R2 Server Minimal Server Interface

When you install you new Windows 2012 R2 server, you’ll notice there that is no option for Minimum Server Interface (MSI). Instead, you only have the choice between Server Core and Full GUI. Note that I’m ignoring the fact that you’re installation media may have Standard vs Data Center. Effectively, this means that you must either add features to Core or remove features from Full GUI if you want to get to MSI.

The primary packages involved in this process are:

  1. Server-GUI-Mgmt-Infra (MSI / FULL)
  2. Server-GUI-Shell (FULL only)

For MSI, the source binaries required to install these packages may or may not be available depending on the original installation version and options chosen during removal (when removing Full GUI)

For now, we’ll assume no binaries are already available and that we’ll need to get them from the installation disk.

Installation Steps – Core to MSI

  1. Mount the ISO or insert the Windows 2012 R2 installation media.
  2. From the CMD prompt, enter powershell.exe
  3. From the PowerShell prompt, run:
    • Get-WindowsImage -ImagePath
    • Get-WindowsImage -ImagePath D:\Sources\Install.wim
    • MSI_GetImages
  4. Note the Index numbers. Note the Index number that corresponds to the SAME edition of Windows (Standard vs Data Center) that does not end with CORE.
  5. From the PowerShell prompt, run:
    • mkdir C:\InstallSource
    • mount-windowsimage -imagepath D:\sources\install.wim -path C:\InstallSource -index:2 -readonly
      • Note: Index 2 is appropriate in this case as the Server Core is Standard Edition and we need to install components from the Full GUI. Index 4 would be correct if this were Data Center edition.
    • Install-WindowsFeature Server-GUI-Mgmt-Infra -Restart -Source C:\InstallSource\Windows
  6. The server will automatically restart and will now have the MSI GUI tools installed!
  7. Login to the server with an Administrative account.
  8. From the CMD prompt, enter PowerShell.exe
  9. From the PowerShell prompt, enter:
    • Dismount-WindowsImage -Path C:\InstallSource -Discard
      • Note: After restart, you should dismount the Windows Image used during installation.

Note: If the binaries required to install the packages are present (i.e., if a previous package uninstall did not include the -Remove flag), you can avoid mounting images or defining an installation source.

  1. From the PowerShell prompt, run:
    • Install-WindowsFeature Server-GUI-Mgmt-Infra -Restart

Installation Steps – Full to MSI

Since the Full GUI has already been installed, the only decision we have to make is whether or not the installation binaries are kept after the Full GUI components are removed.

  1. From the PowerShell prompt, run:
    • Uninstall-WindowsFeature Server-GUI-Shell -Remove -Restart
      • If you want to remove the installation binaries, add the -Restart flag.
    • Uninstall-WindowsFeature Server-GUI-Shell -Restart
      • If you want to retain the installation binaries, just restart with no remove flag.

Windows 2012 R2 Server Full GUI

Full GUI, much like Core is of course the easiest to reach as you can just install the OS at this level. However, assuming that you need to reach Full GUI from either Core or MSI, there is some work to be done. Note that the following steps are essentially identical to those required to get Core to MSI with a single additional feature addition.

Installation Steps – Core to Full GUI

Follow all of the steps in Core to MSI, except at step 5. In addition to the Server-GUI-Mgmt-Infra package, the Server-GUI-Shell package must also be installed.

  1. From the PowerShell prompt, run:
    1. Mount-WindowsImage -imagepath D:\sources\install.wim -path C:\InstallSource -index:2 -readonly
      • Note: Index 2 is appropriate in this case as the Server Core is Standard Edition and we need to install components from the Full GUI. Index 4 would be correct if this were Data Center edition.
    2. Install-WindowsFeature Server-GUI-Shell,Server-GUI-Mgmt-Infra -Source C:\InstallSource\Windows -Restart

Note: If the binaries required to install the packages are present (i.e. if a previous package uninstall did not include the -Remove flag), you can avoid mounting images or defining an installation source.

  1. From the PowerShell prompt, run:
    • Install-WindowsFeature Server-GUI-Shell,Server-GUI-Mgmt-Infra -Restart

Installation Steps – MSI to Full GUI

Follow all of the steps in Core to MSI, except at step 5. Here we need to add a different package to finish the Full GUI install. To do this, do the following:

  1. From the PowerShell prompt, run:
    • Mount-WindowsImage -imagepath D:\sources\install.wim -path C:\InstallSource -index:2 -readonly
      • Note: Index 2 is appropriate in this case as the Server Core is Standard Edition and we need to install components from the Full GUI. Index 4 would be correct if this were Data Center edition.
    • Install-WindowsFeature Server-GUI-Shell -Source C:\InstallSource\Windows -Restart

Note: If the binaries required to install the packages are present (i.e. if a previous package uninstall did not include the -Remove flag), you can avoid mounting images or defining an installation source.

  1. From the PowerShell prompt, run:
    • Install-WindowsFeature Server-GUI-Shell -Restart

Windows 2012 R2 Server Core

Installation Steps – Full to Core

Similar to the steps in Installation Steps – Full to MSI, packages must be removed.

  1. From the PowerShell prompt, run:
    • Uninstall-WindowsFeature Server-GUI-Shell,Server-GUI-Mgmt-Infra -Remove -Restart
    • Note: If you want to leave the installation binaries, skip the -Remove flags.

Installation Steps – MSI to Core

This last option just requires removal of the GUI tools.

  1. From the PowerShell prompt, run:
    • Uninstall-WindowsFeature Server-GUI-Mgmt-Infra -Remove -Restart 
    • Note: If you want to leave the installation binaries, skip the -Remove flags.
Posted in Windows, Windows Core

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: