Configuring the Minimal Server Interface

In our previous blog posting, we introduced the Minimal Server Interface. At the end, we noted that there are three particular Windows features (among others, of course) that can be installed on any server running Windows Server 2012:

  1. Server Core – always installed and enabled; the baseline feature for all Windows Servers
  2. Server Graphical Management Tools & Infrastructure – functionality for Minimal Server Interface
  3. Server Graphical Shell – equivalent to Server with a GUI

We also promised to explain how to combine these features in order to minimize your server’s surface area while preserving just enough of the functionality you need; and indeed, that’s our topic today.
There are two ways to configure the Minimal Server Interface: either start with Server with a GUI and uninstall the Server Graphical Shell feature, or start with Server Core and install the Server Graphical Management Tools & Infrastructure feature.

What is affected when I uninstall the Server Graphical Shell?

In some cases, when you uninstall the Server Graphical Shell, Windows features that depend on Server Graphical Shell will also be uninstalled. In Server Manager, a pop-up dialog box will warn you about what will be uninstalled. Non-Windows features, such as third-party software and other Microsoft products that don’t ship as part of Windows Server 2012, are not affected by the Install-WindowsFeature and Uninstall-WindowsFeature cmdlets. If you aren’t sure what an installation or uninstallation action is going to affect, you can add the -WhatIf flag to see what will be installed or uninstalled along with your selection.

Uninstall-WindowsFeature Server-Gui-Shell -WhatIf

Settings associated with uninstalled features are also removed in some cases. You should back up any settings associated with a feature before you uninstall that feature.

Installing Minimal Server Interface

Because the Minimal Server Interface is situated between the Server Core and Server with a GUI modes, you can either install features on Server Core or remove features from Server with a GUI to reach the Minimal Server Interface installation state.

Caveat: Features on Demand. When you start with a Server Core installation, the files needed to install graphical features aren't installed on the local disk. This is actually a feature called remotification which involves removing the binaries from the local disk while preserving metadata to allow the binaries to be securely reintroduced at a later date. When you try to install a GUI feature, the necessary files are downloaded from Windows Update using a feature called Features on Demand. An internet connection is required and several gigabytes of data will be downloaded. If you don’t want to download all this data, or if your server doesn’t have an internet connection, you can supply an alternate installation source on the command line or configure one via Group Policy. For more information, see the Using Windows Server “8” Installation Options document on technet. 

  • To install Server Graphical Management Tools & Infrasturctureon Server Core:
    1. Open PowerShell, then run the following command: Install-WindowsFeature Server-Gui-Mgmt-Infra
    2. Restart the server when prompted (or run Restart-Computer in PowerShell)
  • To remove Server Graphical Shellon Server with a GUI (either locally or remotely) using Windows PowerShell:
    1. Open PowerShell, then run the following command: Uninstall-WindowsFeature Server-Gui-Shell -WhatIf

    2. You should see Collecting data... for a few moments, and then a listing of the installation summary will be displayed in the PowerShell window. This summary lists any other features that will also be uninstalled at this time.

       PS C:\> Uninstall-WindowsFeature Server-Gui-Shell -WhatIf
      What if: Checking if running in 'WhatIf' Mode.
      What if: Performing uninstallation for "[User Interfaces and Infrastructure] Server Graphical Shell".
      What if: This server may need to be restarted after the removal completes.
                 
      Success Restart Needed Exit Code      Feature Result
      ------- -------------- ---------      --------------
      True    Maybe          Success        {Server Graphical Shell}
      
    3. Restart the server when prompted (or run Restart-Computer in PowerShell)

You can also use the Server Manager GUI remotely to install or uninstall Windows features, including “User Interfaces and Infrastructure,” from a Windows 8 “client” PC or another Windows Server 2012 server that already has Server Manager installed. In other words, you can use Server Manager remotely to manage a server running in Server Core mode.

    1. Open Server Manager, click Manage, then Remove Roles and Features.
    2. On the Server Selection page, select the local server (and/or any servers you want to manage) and click Next.
    3. On the Features page, expand User Interfaces and Infrastructure and uncheck Server Graphical Shell. Make sure that Graphical Management Tools and Infrastructure remains checked; unchecking that feature will uninstall Minimal Server Interface as well, resulting in a Server Core Installation.
    4. At this point, Server Manager will warn you of the impending removal of any dependent features -- such as Desktop Experience -- that you didn't explicitly select to remove. If you don't see a warning, then no additional Windows features will be affected. Accept
    5. Restart the server when prompted.

After you restart the server, Windows will be configured with the Minimal Server Interface. Here’s what it will looks like after you log in:

Server Manager in the Minimal Server Interface

Figure 1. The Minimal Server Interface after signing in

You’ll see Server Manager, which is a graphical tool you can use to manage the local server and other remote servers. Behind Server Manager (which starts maximized on most configurations) you’ll find a command prompt, which you can use to start other applications and management tools (such as “servermanager” if you close Server Manager, or even “powershell” to get a Windows PowerShell command line environment).

If you close everything, you’ll be left with a black screen. To get back to a command line environment or Server Manager, press CTRL+ALT+DEL and select Task Manager. From there, click More details, then File>Run New Task. Type the command you want to run (such as “cmd” to get your command prompt back) and click OK or press Enter.

Next Steps

Now that you have installed the Minimal Server Interface, you can use the command line to install software products (using msiexec or the product’s setup.exe), Windows features, and server roles. You can also use the local management tools provided by Server Manager. On the Tools menu, you’ll find quick shortcuts to most of your MMC snap-ins. Server Manager can also be used to manage other servers, including servers that don’t have Server Manager installed (such as those running in Server Core mode). You can “Add other servers to manage” and then right-click on servers in the list view to see what management options are available for that particular server. Here are some examples of things you can do:

  • Launch Disk Management to remotely configure hard disk partitions
  • Manage Remote Desktop scenarios and licensing (RDSH)
  • Configure Failover Clusters
  • Open MMC snap-ins
  • Open a remote PowerShell session

In some cases, you can even manage multiple servers simultaneously, from the same interface. Server Manager is a very powerful tool indeed. It is important to note, however, that all functionality exposed through Server Manager is also available via Windows PowerShell both locally and remotely. 

It's also a great idea to start exploring PowerShell to experience the power and control that our new command line interfaces offer. You can manage this server remotely, too, from other Windows 8 PCs and servers. We'll be posting some general information on remote management in an upcoming post; for now, check out What needs to be configured to do remote disk management of a Server Core installation in Windows Server 2012 PowerShell at the Server and Cloud Partner and Customer Solutions Team Blog .

Conclusion

The Minimal Server Interface is designed to be a compatibility or transitional layer from a Server with GUI to Server Core. Although you benefit from reduced patching footprint and lower resource utilization in comparison to the full Server with a GUI installation option, the smallest surface area is achieved using Server Core. When you are unable to use Windows Server Core, the Minimal Server Interface provides the best of both worlds of Windows Server. It delivers comprehensive graphical management capabilities while reducing patching requirements and minimizing disk and memory footprint. Please try the Minimal Server Interface and let us know what you think!