Thursday, July 05, 2012

Adding (and removing) the GUI From Server Core in Server 2012

One (of the very many!) neat feature of Server Core inside Windows Server 2012 is the ability to add/remote the GUI. This is a feature I wanted since Microsoft first brought out Server Core.  To add or remove the GUI in Server Core, you need to run a cmdlet from the DISM module. To Add the GUI to Server core:
Enable-WindowsOptionalFeature –Online –NoRestart `
  -Featurename ServerCore-FullServer,Server-Gui-Shell,Server-Gui-Mgmt 
Removing the GUI is equally as simple:
Disable-WindowsOptionalFeature –Online -NoRestart `  
  -Featurename ServerCore-FullServer, Server-Gui-Shell,Server-Gui-Mgmt 
I’ve written a couple of functions that do this for you – posted over on my PowerShell Scripts blog.
This is pretty cool – and it works incredibly easily. This allows you to install a server core machine, add the GUI for initial setup or subsequent troubleshooting but then easily remove it for production running. Another GREAT Server 2012 Feature enabled with PowerShell!!

Thanks to Scott R for noting a typo in this post - now fixed!

1 comment:

Scott R. said...


Thanks for the great post.

The two example commands in the post appear to be the same. Should the second one be "Disable-WindowsOptionalFeature ..."?

Scott R.