Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, June 23, 2014 7:12 AM
Hello,
I try to install the Windows Feature "NET-Framework-Core" on a clean Windows Server 2012 R2 computer. I use the following command for this:
Install-WindowsFeature -Name NET-Framework-Features -Source "\\SERVER01\2012R2\sources\sxs"
This fails with the following error:
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. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f0906
At line:1 char:1
- Install-WindowsFeature -Name NET-Framework-Features -Source "\SERVER01\2012R2 ...
-
+ CategoryInfo : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
Exception
+ FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Windows.ServerManager.Commands.AddWindowsF
eatureCommand
My account is Domain Admin and PowerShell is started in elevated Mode. Also the computer account has full control permissions on the share. When I install this feature form a local disk, it works. I use the following command:
Install-WindowsFeature -Name NET-Framework-Features -Source "D:\2012R2\sources\sxs"
After this, I restart the computer, remove the feature (Remove-WindowsFeature), restart the computer again and then... I install the same feature again with the first command, so from a network share. Now it does work! Can some please explain this behavior? Installing this feature from a share should work out of the box, right?
All replies (8)
Monday, July 7, 2014 11:05 AM âś…Answered
This is a normal behavior, if the local Administrator account and the Domain Administrator account do not share the same password and UAC is on.
Non elevated you gain access to the share, but have no admin access to the station, on which you are working. The evil part is, as soon as you gain elevated access, you can change the configuration on the workstation, but have no longer access to the share (unless the share and NTFS permissions allow also guest read access, which could eventually work).
Best greetings from Germany
Olaf
Monday, June 23, 2014 7:20 AM
There should be something like
-Source \server2\winsxs
or use wim
http://technet.microsoft.com/cs-cz/library/jj574158.aspx
Rgds
Milos
Monday, June 23, 2014 10:03 AM
I made a copy of the "sxs" folder from the Windows Server 2012 R2 installation iso and placed the complete folder content in "\SERVER01\2012R2\sources\sxs". Why is this not working? And why is it only working after the feature is installed before? Can I also use "wim:" with a share? I prefer not to use the "wim:" syntax.
Saturday, June 28, 2014 6:23 AM
Hi TechPeepz,
" 2) Path specified as the value of this parameter. If you add a UNC path, verify that the computer account of the target server has Read permissions on the share. The computer account should be in one of the following formats: DOMAIN\SERVERNAME$ or SERVER$ "
For details please refer to following link:
http://technet.microsoft.com/en-us/library/jj205467.aspx
Hope it helps
Best Regads
Elton Ji
Tuesday, July 1, 2014 8:46 AM
Thank you Elton for your reply. I already tried that but it didn't had any effect. I will try to explain what I did and what worked and what not:
- I gave the computer account (SERVER01$) full admin rights on the UNC share.
- I restarted SERVER01.
- I use the first command on a clean OS which gives me the error.
- I use the second command on the same machine (used a local path instead of a share) which worked and installed the feature.
- I removed the same feature with Remove-WindowsFeature.
- I restarted SERVER01.
- I tried again with the first command (installing the feature from a share) and it worked...
I am searching for a good explanation why this is happening and what should be the fix for this so it works directly from a share. Maybe my clean Windows Server 2012 R2 OS is corrupted?
Tuesday, July 1, 2014 2:46 PM
My account is Domain Admin and PowerShell is started in elevated Mode.
This may be the reason. Starting PowerShell in elevated mode means, the session using the local credentials of the Administrator account on the machine.
This local Administrator account may not have the right to access the sources you are referring to on the shared folder.
Best greetings from Germany
Olaf
Monday, July 7, 2014 9:54 AM
When I try to install the feature with PowerShell in non-elevated mode I receive the following error:
Install-WindowsFeature : You do not have adequate user rights to make changes to the target computer. If you are
already a member of the Administrators group on the target computer, the changes might have failed because of security
restrictions imposed by User Account Control. Try running Install-WindowsFeature in a Windows PowerShell session that
has been opened with elevated rights (Run as administrator).
At line:1 char:1
+ Install-WindowsFeature Net-Framework-Features -Source "\\SERVER01\2012R2\sour ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature],
Exception
+ FullyQualifiedErrorId : Provider_UserIsNotAdmininistrator,Microsoft.Windows.ServerManager.Commands.AddWindowsFea
tureCommand
Even when I try to install the feature with the GUI (Server Manager) and use a UNC path as alternative source path, the installation will fail. Is there someone who can reproduce this behavior? Or someone who can explain this? I would really like to have a solution for this problem.
Monday, July 7, 2014 10:04 AM
Hi TechPeepz,
have you tried changing this policy setting? http://technet.microsoft.com/en-us/library/hh825020.aspx
I had the same problem a few weeks back and it turned out that it was impossible to install the feautres when a language Pack for windows server is installed. We had to use lpksetup.exe and uninstall the language pack for the server. After uninstalling the language Pack Install-WindowsFeature worked as expected
Regards
Carsten