Sep 30, 2017 I have recently installed windows server 2012 standard to replace win7. I would like to convert from server core to GUI from cmd.exe. Or, any alternatives to access my old files for a disc reformat would also suffice. To install the GUI on a core server from a command prompt. Start the commando prompt elevated and run: Powershell. Jul 06, 2015 Windows Server 2012 comes with a couple of new features that can be used to make your life as a System Administrator much better. One of these cool features is the ability to convert a server with full installation into a core edition and vice versa.
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:sourcesinstall.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.
I will assume the index is 2.
Step 3: Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Source:wim:d:sourcesinstall.wim:2 -Restart
This installs the needed features from the wim source.
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.
References
- Deployment Image Servicing and Management Command-Line Options (technet)
- Install Server Roles and Features on a Server Core Server (technet)
- Windows Server Installation Options (technet)
3 Comments
- Ghost ChiliNick42 Aug 3, 2013 at 01:17am
I didn't include the case of the binaries being removed. Nice touch.
*
http://community.spiceworks.com/how_to/show/17424-add-or-remove-gui-in-windows-server-2012 - Cayenneonecogmind Jun 6, 2018 at 06:11pm
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.
- Pimientorclayt Jun 25, 2018 at 11:30pm
Here's how I got my Server 2012 R2 Core system moved over to the GUI. Hopefully it helps someone!
1) Checked C:WindowsLogsCBSCBS.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:WindowsWinSxS 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
Procedure to recover GUI in windows 2012 and 2012R2
Windows Server 2012 includes .NET Framework 4.5 and Windows Server 2012 R2 includes .NET Framework 4.5.1. The .NET Framework provides a comprehensive and consistent programming model to build and run applications (including Roles and Features) that are built for various platforms. Windows Explorer (Graphical Shell), Server Manager, Windows PowerShell, IIS, ASP .NET, Hyper-V, etc, are all dependent on .NET Framework. Since there are multiple OS components dependent on .Net Framework, this feature is installed by default. Therefore, you do not have to install it separately.
It is not recommended to uninstall .NET Framework. In some given circumstances, there may be a requirement to remove/re-install .Net Framework on Windows Server 2012/2012 R2.
When you uncheck the .NET Framework 4.5 checkbox in the Remove Roles/Features Wizard of Server Manager, Windows will check all roles/features that may also be installed as it would need to be removed as well.. If there are other roles or features dependent on .NET Framework, those would be listed in this additional window.
it will leave the server installed in Core and you will be able to get the command prompt only.
For Example:
If you read through the list, the components that are affected by this removal are listed as follows:
- .NET Framework 4.5 Features
- RSAT (Remote Administration Assessment Toolkit) which includes Hyper-V Management tools and Hyper-V GUI,
- User interfaces and Infrastructure, which includes Graphical Management Tools and Infrastructure Server Graphical Shell (Full Shell and min Shell),
- PowerShell which will remove complete PowerShell 4.0 and ISE
The list of components may differ depending upon the Roles and Features installed on the Server machine.
How to recover from this situation and to bring back the power shell, .net feature and UI in 2012, 2012U1
As stated earlier, this will leave the server without a graphical shell for user interaction. Only the command prompt will be available post reboot.
If you get into this situation, run the below commands in the Server Core’s command prompt window to help you recover:
i) Run the below commands one by one
DISM.exe /Online /enable-feature /featurename:NetFx4 /all
DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell /all
ii) Reboot the server
iii) To restore the GUI need to run the PowerShell commands. Below procedure how to open PowerShell prompt in server core’s command prompt
a) To begin, press CTRL-ALT-Del and select Task Manager from the list
b) Once Task Manager Opens select File and Run new task
c) You should now see the Create new task menu, type PowerShell.exe and select OK
d) PowerShell prompt should now be open
iv) Run the below commands on the PowerShell prompt
Install-WindowsFeature Server-Gui-Shell
Install-WindowsFeature Server-Gui-Mgmt-Infra
v) Once the GUI Shell is installed, you will need to restart the server with the following command:
Restart-Computer