Share via


Install Server-GUI-Shell feature on Domain controllers running Windows 2012 R2 server core

 

Scenario – When you try to enable the Server-GUI-Shell feature on Windows 2012 R2 server core, you get some error. This TechNet article talks about the scenario we have mentioned here - https://support.microsoft.com/en-us/kb/2913316

Ideally you can install any Windows 2012 R2 server features from the local WinSxS directory (if it’s not removed as a part of deployment plan). When you install Windows Server Core, the files needed for GUI functionality are removed from the installation. So while installing the Server-GUI-Shell feature, this feature is not available on the Server Core operating system and you must provide an alternate path ( - source parameter, location to WinSxS folder or WIM file ) for feature installation. If you have access to internet then server can install the feature from Windows update, but as most of the time we don’t have internet access on Domain controllers, this method won't help.

As documented in the above article, we can provide the path to a WIM file but for that we need to have WIM file updated with the latest Windows updates, and we need to keep the WIM file updated on a regular basis. The easiest option is to copy the WinSxS folder from another server (running Windows 2012 R2 GUI edition) and provide the folder location as a source path. Steps given here talk about the process of installing Server-GUI-Shell feature using the WinSxS folder.

1. Before installing GUI-Shell feature on a domain controller, copy WinSxS folder from a Windows 2012 R2 server running in full GUI installation mode to a local directory. If you are installing it on multiple domain controllers, you can copy the WinSxS folder on a network share. Install-WindowsFeatureuses the machine account credentials to access the installation source. If the installation source is located on a network share, ensure that the machine account has permissions to read from the network share.

Default location for the WinSxS folder - C:\Windows\WinSxS

2. Copy the WinSxS folder to any local directory. For e.g. C:\Sw\WinSxS folder as shown in the given screenshot.

image

3. Once the WinSxS folder is copied locally on the DC, run the following command with the -source parameter to enable the GUI mode.

Install-Windowsfeature server-gui-shell –Source < path to WinSxS folder>

image

NOTE: When you copy the WinSxS folder make sure the source server is fully patched and has the latest Windows update. Once the GUI Shell feature is installed, you can go ahead and delete the folder from local drive if you are using local folder for installation. In case of Network share, make sure you are using the latest copy of WinSxS folder and re-copy the folder when new patches are applied on the server.

4. Use this command to uninstall the Server GUI feature if you have to revert back to Core installation.

Uninstall-WindowsFeature Server-Gui-Mgmt-Infra -Restart

image

 

5. When you want to re-enable the GUI-Shell on the same box you won't need to specify the source path as the binaries will be available on the server just like other features, after it was installed for the first time.

Install-WindowsFeature server-gui-shell

image