Freigeben über


Converting from Server 2012 Core install to Full GUI

Windows Server 2012 Core boasts many enticing enhancements which include reducing the installation footprint, attack surface and management overhead.  Features on Demand allows the administrator to remove roles which are not needed to help reduce the disk size required for the installation.  By default all features are stored in the %windir%\winsxs directory, but administrators can use the uninstall-windowsfeature <featurename> –remove command to delete the files associated with that feature from the winsxs directory. 

If you install Server Core edition or have removed the Server-Gui-Shell feature from Windows Server 2012 and want to convert to full GUI, you have some additional tasks that you will need to perform.  I attempted to just execute the widely published PowerShell command to convert to full GUI and received the following message.

The installation froze for some time at this stage before showing the error message.

image

image

Error Message:

Install-WindowsFeature : The request to add or remove features on the specified server failed.

Installation of one or more roles, role services, or features failed. The source files could not be downloaded.  

Use the source option to specify the location of the files that are required to restore the feature.

Error: 0x800F0906

The error message says it cannot find the source files to perform the installation. 

I was building a new lab environment and didn’t have the ability to stage the installation files on the network, but that is an option.  My environment was inside a Hyper-V environment on my Windows 8 system, so I needed to pull the files from the disk.  As you know the installation files are located inside the /sources/install.wim file.  To get the Full GUI running, I performed the following steps:

  1. Mount the Windows Server 2012 ISO to the host.
  2. open an administrative command prompt
  3. mkdir c:\mount
  4. check your wimfile to determine the correct index for the OS (mine was 4) -the command is dism /get-imageinfo /ImageFile:d:\sources\install.wim
  5. ‘dism /mount-wim /wimfile:d:\sources\install.wim /index:4 /mountdir:c:\mount /readonly
  6. powershell (enter PowerShell prompt)
  7. install-windowsfeature server-gui-mgmt-infra,server-gui-shell –restart –source c:\mount\windows\winsxs
  8. Unmount Wim (dism /unmount-wim /mountdir:c:\mount)
  9. Remove Mount Directory (rmdir c:\mount)

 

The seventh command will finish the installation and restart the server when complete.  When the Install-WindowsFeature PowerShell command is executed and the server has internet access, the required files can be downloaded from Windows Update.   Some of these features are very large, so specifying a network location or mounting the installation WIM, using the procedure above, may be the best alternative for installing removed features.

 

-John

Comments

  • Anonymous
    October 29, 2013
    The comment has been removed
  • Anonymous
    June 19, 2014
    Hi Chad,
    The best way is to place W2012 Source file on a share (e.i \fileserverW2012Source)
    from server core, use net use to map drive to \fileserverW2012Source ==> net use \fileserverW2012Source /persistent:yes

    Then, the command prompt usind DISM to mount W2012 image file from the network drive you just mapped
    then launch add-WindowsFeature again and if DISM detect the correct source file you will be able to switch to Core with GUI or Shell GUI

    ++
    HK
  • Anonymous
    September 21, 2014
    hi if you don't mind i was having the same error and i followed the steps to see if it would work but when i i typed in the command "dism /mount-wim /wimfile:d:sourcesinstall.wim /index:4 /mountdir:c:mount /readonly" it gave me an Erro:87 and said the mount-wim/wimfile option is unknown
    any idea on what i should do
    Thanks
  • Anonymous
    February 03, 2015
    when i type i the command dism /mount-wim /wimfile:d:sourcesinstall.wim /index:4 /mountdir:c:mount /readonly i get the error 21 device is not ready, what should i do? please help
  • Anonymous
    March 22, 2015
    Thanks John. Took no more than 10 mins in total to convert core to GUI (mounting the image and then installing GUI feature) Worked a treat! Dee
  • Anonymous
    March 24, 2015
    This was a life saver. I had a project where the GUI was not installed and needed this exact set of steps to quickly continue progress. All steps worked perfectly.
    The world is a better place because of people who provide this information. Pay it forward folks.
  • Anonymous
    April 09, 2015
    Well done, it worked smoothly, thanks alot
  • Anonymous
    April 22, 2015
    Only enter the command dism /mount-wim /wimfile:d:sourcesinstall.wim /index:4 /mountdir:c:mount /readonly

    You should not enter any symbol like " . It will work
  • Anonymous
    April 27, 2015
    Here is a simpler method:

    1. get the wimfile index of your current installation
    2. mount or map to the w2k12 media DVD
    3. Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Source wim:x:sourcesinstall.wim:y
    x is from step 2. y is from step 1

    https://support.microsoft.com/en-us/kb/2913316
  • Anonymous
    April 27, 2015
    http://win2012pikasuoh.blogspot.com/2015/04/changing-windows-2012-core-to-full-gui.html

    Here is a simpler method:

    1. get the wimfile index of your current installation
    2. mount or map to the w2k12 media DVD
    3. run powershell by running POWERSHELL.EXE in the CMD prompt.
    4. Issue the command :
    Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Source wim::sourcesinstall.wim:

    where x is from step 2. y is from step 1
  • Anonymous
    May 17, 2015
    pikasuoh method worked because you need to find out which index number you need to use. My version only had 1 index, not 4.
  • Anonymous
    May 25, 2015
    Hi,

    I followed above steps and all worked ok. I notice that the c:mount folder is using almost 10GB space. Can I delete that folder? Or are there any special commands to remove it?
  • Anonymous
    June 10, 2015
    To clean up and unmount the wim when you're finished, follow this link.

    http://www.msigeek.com/2635/unmount-and-clean-up-a-wim-image-using-deployment-image-servicing-and-management-dism
  • Anonymous
    August 05, 2015
    hi i have installed server 2012 core after installing in command prompt i have entered powershell, then in powershell i tried install command of gui install-windowsfeature server-gui-mgmt-infra, server-gui-shell-restart . but it is not installing gui and iam getting error. please help me
  • Anonymous
    August 05, 2015
    install-windowsfeature server-gui-mgmt-infra, server-gui-shell-restart
  • Anonymous
    August 05, 2015
    please help me
  • Anonymous
    September 23, 2015
    Hello,

    I am using this lab online to practice. I got stuck in password. Do any one know what would be the pass word for the practice lab online?
  • Anonymous
    December 21, 2015
    It works! Good post! Congratulations brother.
  • Anonymous
    December 23, 2015
    Keep getting the source not found error. using Install-windowsfeature Server-gui-mgmt-Infra, Server-Gui-Shell -source wim:d:sourcesinstall.wim:2. The source is a mounted disk on the VM and i can browse to it without any problems. any suggestions ? The server is a 2012R2 core fresh install and have no internet access. Trying to use the same image i installed it from but no use.

    any advice is highly appreciated

    /Joakim
  • Anonymous
    February 09, 2016
    Worked for me. Thanks & well done.
  • Anonymous
    February 09, 2016
    Worked for me. Thanks & well done.
  • Anonymous
    February 09, 2016
    Thank you for the great technical advise