Adding the GUI to a Server Core Install
If you installed the server server core, follow these steps to add the GUI. The server will reboot
1) Mount the Windows Installation CD using Virtual Media 2) Run Get-WindowsImage -ImagePath E:\Sources\install.wim to get the index numbers of the images. Note one of them that is not server core. In the default images 2 is full standard and 4 is full datacenter. 3) Run Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell –Restart –Source wim:E:\sources\install.wim:4 where the 4 at the end is the image index from above (4 will work by default)
Removing the GUI from a Full Server
These steps will turn a full install into a server core system. The server will reboot
Remove-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell -Restart
Adding GUI back if you’ve removed it
These steps will add the GUI back to a system if it’s had the GUI in the past and you removed it using the above steps. This is because when you remove the GUI the files aren’t deleted so you don’t need the source. The server will reboot.
Run sconfig and choose Restore Graphical User Interface (GUI). This is normally option 12.
In Server 2016, this option is not available because of architectural changes in the image. Please check this link.