Advanced Windows PowerShell Scripting Video Training

Advanced Windows PowerShell Scripting Video Training
Advanced Windows PowerShell Scripting Video Training

Friday, September 28, 2012

Error when moving from Core to full GUI in Server 2012

If you are installing the full GUI on your Server core 2012 and receive this error, it is an easy fix.

 

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.

 

This simply means that your installation files need to be made available to PowerShell to do this.  To correct this, insert your installation media or map a drive to the installation source on your network.  Now add he –Source parameter to your Install-WindowsFeature cmdlet pointing to Windows folder to complete the installation

Import-Module ServerManager

Imstall-WindowsFeature –IncludeAllSubfeature User-Interfaces-Infr –Source <SourcePath>

3 comments:

Anonymous said...

it seems when updating windows (currently 10 hotfixes) that this scenario doesn't work anymore. Nor online or offline

Anonymous said...

Any suggestion on what the source might be? I have tried just about everything I can think of (d:\, d:\sources\sxs, d:\setup.exe) What should the source be?

Jason Yoder, MCT said...

Mount a windows installation image using this command. I am assuming your D: is your DVD drive.

Mkdir c:\mount

dism.exe /mount-image /imageFile:d:\sources\install.wim /index:4 /mountdir:c:\mount /readonly

Install-WindowsFeature -IncludeAllSubfeature User-interfaces-infra -source:c:\Mount\Windows

The first command makes a directory to mount the image. The second mounts the image. The third will install the feature.

To dismount this image:

Dism.exe /unmount-Wim /mountdir:c:\mount