Server 2012 R2 Hyper-V Core to GUI Conversion

There are a number of reasons why this type of conversion might be necessary and if you found this blog post I’m guessing one these applies to you. Maybe you inherited a Server Core environment and are having a hard time managing? Just aren’t a fan of Core and need to convert? Or maybe you installed Core and just want that GUI goodness back. Luckily the GUI can be added to a Core installation via PowerShell without having to reinstall Windows. Trying to upgrade in place using the Install-WindowsFeature cmdlet may fail at 68% after 10 minutes of waiting due to a failure to find the source files (see error below). Of course, nothing is easy so hopefully this will help you get through what was supposed to be a simple conversion if you find yourself in a similar situation.


The easiest way to proceed is to first mount the 2012R2 ISO that matches your Core installation and point the cmdlet at the attached source. Of course you can do this via IPMI/ iDRAC or if your ISO files are already on an internal file structure, you can mount and upgrade directly within PowerShell. Very important:  the ISO must match the installed build of your Windows Server Core machine or this process will fail!

First map a drive to your ISO repository, if this goes according to plan it won’t need to be persistent:

Next mount the disk image to your server, change the drive letter and ISO name accordingly:
Mount-DiskImage –ImagePath ‘W:\en_windows….ISO’ -Storage Type ISO -PassThru

The Mount-DiskImage cmdlet will mount your ISO to the next available drive letter on the host. To determine what that is, pipe your previous command to the Get-Volume cmdlet. You can see that it reveals E as our new drive letter assigned to the mounted ISO:
Mount-DiskImage –ImagePath ‘W:\en_windows….ISO’ -Storage Type ISO -PassThru | Get-Volume

If your source ISO has multiple Windows installations within, determine which version is required for your installation by identifying its index so you will install from the proper wim file. In the example below index 4 shows the Server Datacenter product which is what I need. Index 2 show the Standard license level, 1 and 3 show the Core products. This needs to match what you already have installed (Datacenter Core—>Datacenter GUI). If you get an error during the upgrade you’ve either chosen the wrong ISO or the wrong Server build. Volume License vs MSDN, 2012 R2 with Update or without…the distinction matters.
Get-WindowsImage -ImagePath e:\sources\install.wim

Run the feature install command and point to the wim file mounted on the new drive letter with the correct Server edition index number (pay close attention to the syntax!). The feature installation will run and if all goes well your server will reboot then come up with the full GUI version of Server in 10-20 minutes.
Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart -Source wim:e:\sources\install.wim:4

I did this while recovering several hosts from an orphaned AD environment which also orphaned a 4-node failover cluster. Some helpful PowerShell commands useful to me along the way:
Identify Network Interface Index: Get-NetIpConfiguration
DNS Change: Set-DNSClientServerAddress –InterfaceIndex x -ServerAddresses (“”, “”)
Domain change: Add-computer -domainname
Forcibly remove host from a domain: netdom remove ComputerName /domain:DomainName /Force



Post a Comment

Recent Comments

Popular Posts

Powered by Blogger.

Twitter Feed