Add/remove GUI in Windows Server 2012

In Windows Server 2012, Microsoft made it easy to add and remove the graphical user interface (GUI) using simple powershell commands.  Running a server without the overhead of the GUI (called Server Core) helps keeps the server more secure since less programs are running that could be exploited.  Running without a GUI should also help limit the number of reboots required every Patch Tuesday, but in truth I haven’t yet seen that many reductions in reboots on my Server Core systems.

To install the user interface, open powershell and type the following cmdlet:

Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Similarly, you can uninstall the user interface with the following cmdlet:

Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Of course, running these cmdlets will require a reboot to finish the configuration.

Patch Tuesday: problems with KB2840628

Microsoft generally does a pretty good job at testing patches before they are released, making Patch Tuesday pretty effortless (except for the persistent need to reboot servers — wish they’d adopt a method like Linux where we could just restart the affected service after the update is installed).

But this month was different.  I applied the July 2013 patches first to a development system and no issues were reported.  So a few days later I pushed them out to production only to find the .Net Framework was broken; every managed procedure/trigger failed with the infamous .Net “Object reference not found” error.

It took me a while to pin down the problem.  It was caused by MS13-052 (KB2840628).  Uninstalling that patch and rebooting fixed the errors.

Microsoft mentions the problem in a related document and they mention a workaround in scenario 2.