Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Unable to install GUI role in Windows Server 2012 R2

  • Please log in to reply
3 replies to this topic

#1 lovely_day


  • Members
  • 3 posts

Posted 10 March 2016 - 12:52 PM


I installed Microsoft Windows Server 2012 R2 in Server Core addition. Then, I updated it. I need to add GUI feature into it. First I tried following code in PowerShell.

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

It did not work even though I have internet connectivity. Then I tried to follow steps at this page: how to change between full installation and server core?

It did not work. Then I came across this page: Why I can’t convert my Windows Server 2012 R2 Core to GUI. According to this page "The problem is that your Windows Server installation source files are older than your server installation with latest Windows Updates. To fix the problem you need to update also your installation source files regularly otherwise you may run into issues, if you need the source files really quickly for recovery etc." So I followed along this page the following steps. But I am still getting an error. 

# Create folders
New-Item -Path C:\WS2012R2 -ItemType Directory
New-Item -Path C:\TEMP -ItemType Directory

# Copy the install.wim to temporary folder
Copy-Item E:\sources\install.wim C:\TEMP

# Remove the read-only attribute from the copied file
Set-ItemProperty -Path C:\TEMP\install.wim -Name IsReadOnly -Value $False

# Get the Windows Image Index
Get-WindowsImage -ImagePath C:\TEMP\install.wim

# Mount the Image
Mount-WindowsImage -Path C:\WS2012R2 -ImagePath C:\TEMP\install.wim -Index 4

# Add the Updates to Windows Image
$Updates = Get-ChildItem \\something\shared\updates
foreach($item in $Updates){Add-WindowsPackage -PackagePath $item.FullName -Path "C:\WS2012R2"}

#install GUI
Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra -Source C:\WS2012R2\Windows\WinSxS

This failed. And then I tried the below one.
Install-WindowsFeature Server-GUI-Shell, Server-GUI-Mgmt-Infra -Source wim:C:\Temp\install.wim:4




Please see attached image for error. I don't know what to do. May be I should uninstall Windows and install it again with GUI if that is possible. Any help would be appreciated. Thanks.

Attached Files

Edited by lovely_day, 10 March 2016 - 12:59 PM.

BC AdBot (Login to Remove)


#2 lovely_day

  • Topic Starter

  • Members
  • 3 posts

Posted 10 March 2016 - 02:01 PM

I figured the error. I forgot to commit before installing GUI role.

#3 Sneakycyber


    Network Engineer

  • BC Advisor
  • 6,135 posts
  • Gender:Male
  • Location:Ohio
  • Local time:02:02 PM

Posted 10 March 2016 - 09:36 PM

Thanks for posting your solution!
Chad Mockensturm 
Network Engineer
Certified CompTia Network +, A +

#4 jjMan


  • Members
  • 1 posts
  • Local time:01:02 PM

Posted 19 July 2018 - 09:15 AM


Edited by jjMan, 19 July 2018 - 12:33 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users