How to install server GUI on Windows Server 2016 from PowerShell
You can install server system with or without GUI, you have two choices:
- install core edition
Windows Server 2016 Technical Preview 3
- install server with GUI
Windows Server 2016 Technical Preview 3 – Server with Desktop Experience
if you choose the second installation option, that’s all in this case. After server OS installation you will get Windows Server desktop with complete GUI.
What if you decided to install full core edition and after some time you don’t want to use it anymore. There is an option to use PowerShell and install missing features to have full server with GUI. This time with Windows Server 2016 it is not so simple as it was in Windows Server 2012/2012R2.
When you try to install missing feature from PowerShell console and your server has no access to the Internet, installation fails!
This happens because from Windows Server 2016, GUI features are removed from installation image and you cannot simply activate them to turn on/off core edition.
Open PowerShell console and search for features name to install
Get-WindowsFeature -Name *GUI*
in “Install state” column you will see that features state is “removed”.
If you simply try to install these features and your server has no access to the Internet or installation source is not defined by Group Policy, operation will fail. This is highly possible that your server has no access to the Internet and if this is the first Windows Server 2016 installation, you would probably not have central location where shared components for this system are available.
In case where your server has access to the Internet, simply type in PowerShell console this syntax and wait couple of minutes
Install-WindowsFeature -Name Server-Gui-Shell,Server-Gui-Mgmt-Infra
but if you have no access to the Internet, you will see similar error in the console
then you have to use your installation media to successfully install server GUI features. Before you can do that, you need to identify appropriate index of Windows Server 2016 edition from which you want to install features. They are only available in full editions, so you need to skip indexes for core editions in the list. To get information of available editions in install.wim installation file, you need to use below PowerShell cmd-let
Get-WindowsImage -ImagePath d:\sources\install.wim
where d:\ is a letter of you drive with installation media
Check index number for Standard of Datacenter edition and remember it. As you can see in the screen above, appropriate image index is 2 or 4
In these images, all required features are available and they can be used as a source of installation.
To install feature from non-default location, you need to specify -Source switch to Install-WindowsFeature cmd-let. The switch requires appropriate syntax
the full installation syntax is available below
Install-WindowsFeature -Name Server-Gui-Shell,Server-Gui-Mgmt-Infra -Source wim:d:\sources\install.wim:2
and now, you installation should succeed even if your server does not have an access to the Internet
after some time, you would be prompted to reboot the server to apply the changes
use PowerShell cmd-let to restart server and wait couple of minutes to apply changes
when server is booting you should see on the screen features configuration
when it is done, you should see logon screen
Provide appropriate credentials and check if you can see desktop
If you are able to see START tile and other desktop features, congratulations. Everything is configured properly. You can do whatever you want with your server, now.
Author: Krzysztof Pytko