Convert Windows Server 2012 Core to GUI when originally installed as server core or if the binaries have been removed manually (Features on Demand).

When Windows Server 2012 is installed as core, it doesn't include the binary files needed to install the GUI in the winsxs directory. Using Install-WindowsFeature will attempt to download the necessary files from Windows Update, but those files can take a long time to download.

This how-to will demonstrate how to get the source files from an ISO/DVD.

3 Steps total

Step 1: Mount the installation ISO or load the installation DVD.

I will assume this will be in drive D:

Step 2: Get-WindowsImage -ImagePath d:\sources\install.wim

This command will list the install options on that particular install DVD. Make a note of the index number of the option for the non-core version.

Note: I have had issues installing from DVD after system updates. It will throw an error saying that the source files couldn't be found. My theory is that the system, due to updates, requires newer packages than those found on the installation DVD. Unfortunately, if this is the case, you may have to allow it to download from Windows Update.

Just wanted to point out if someone comes here hoping to convert a Server 2016 Core to GUI, it cannot be done, will need to re-install it and use the GUI Option. This version 2016 does not allow you to switch modes like Server 2012.

Here's how I got my Server 2012 R2 Core system moved over to the GUI. Hopefully it helps someone!
1) Checked C:\Windows\Logs\CBS\CBS.log after trying to install the feature and saw payload files were missing. Example: "Failed to find payload files, component:amd64_microsoft-windows-w..client-ui.resources_31bf3856ad364e35_7.9.9600.18039_en-us_a9315b328356154d, file: wushareduxresources.dll.mui"
2) From another Server 2012 R2 system that had the GUI and was fully patched, I copied over the C:\Windows\WinSxS folder to a temp folder on my Server 2012 R2 Core server (My folder was C:\TempTest). NOTE: I actually had to copy over the WinSxS folder from two different servers because the first time I tried to enable the feature I saw the same payload problems in the CBS.log except it would point to a different version (e.g. amd64_microsoft-...7.9.9600.18066..).
3) On the server core system: Dism /Online /Enable-Feature /All /FeatureName:Server-Gui-Mgmt /Source:C:\TempTest /LimitAccess
4) After it installed, it required a reboot
5) When it came back up, got the cmd prompt and after about a minute Server Manager popped up (some GUI management features are available after “Server-Gui-Mgmt” feature is installed)
6) I then used Server Manager to add the “Server Graphical Shell” feature which is under the “User Interfaces and Infrastructure” section and rebooted. You can do this through the command line again with the FeatureName "Server-Gui-Shell".
7) When it came up, had the full GUI and then installed GUI-related Windows Updates from over the years