r/PowerShell • • Oct 03 '18

Use PowerShell to Install the Remote Server Administration Tools (RSAT) on Windows 10 version 1809

https://mikefrobbins.com/2018/10/03/use-powershell-to-install-the-remote-server-administration-tools-rsat-on-windows-10-version-1809/
143 Upvotes

14 comments sorted by

3

u/gaz2600 Oct 03 '18

I get an error "Add-WindowsCapability : Add-WindowsCapability failed. Error code = 0x800f0954"

3

u/mikefrobbins Oct 03 '18

0x800f0954

Try adding the Source parameter and see if that resolves the error:

Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online -Source C:\Windows\WinSxS\

2

u/gaz2600 Oct 03 '18

Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online -Source C:\Windows\WinSxS\

it does not. If I do this the error is gone but it does not actually install anything

$x = Get-WindowsCapability -Name RSAT* -Online
Foreach ($item in $x) { Add-WindowsCapability -name $item.DisplayName -Online }

3

u/mikefrobbins Oct 03 '18

0x800f0954

There's a mention of that error in this thread: https://www.reddit.com/r/sysadmin/comments/9l2sa5/rsat_on_windows_10_1809/

6

u/gaz2600 Oct 03 '18

Thanks the fix on that link worked. " Firing up gpedit and editing "Computer Configuration\Policies\Administrative Templates\System\Specify settings for optional component installation" lets you install. Just tick the box that says "Contact Windows Update directly to download repair content instead of WSUS" and apply. "

4

u/[deleted] Oct 03 '18

It's because the get-windowscapability is still broken. Hoping they fix it in the upcoming update.

16

u/Thotaz Oct 03 '18

It's weird (and frustrating) that under the hood Microsoft makes a distinction between Windows(optional) features, and Windows capabilities, but in the GUI they call the "capabilities" optional features just like the Windows optional features.

9

u/the_progrocker Oct 04 '18

This should work I believe. ms-updates are blocked on my firewall, so I'm trying to think up something else.

#Set Windows Update Server Key to 0
Set-ItemProperty -Path HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWUServer -Value 0

#Restart Windows Update Service
Restart-Service -Name wuauserv -Force

#Get RSAT Tools
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online

#Set Windows Update Server Key to 1
Set-ItemProperty -Path HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWUServer -Value 1

#Restart Windows Update Service
Restart-Service -Name wuauserv -Force 
#Done

6

u/Twitfried Oct 03 '18

Was just looking for this after upgrading last night. Thanks!

2

u/chown-root Oct 04 '18

Just did this manually this afternoon.

2

u/xevilrobotx Oct 04 '18

I'm seeing others getting 0x800f0954, but I'm getting 0x8024500c

4

u/captain5260 Oct 03 '18

Granted I’m a command line guy, but damn, I love PowerShell! Can’t wait to run PowerShell to Install PowerShell. Waaaaaaaaaa? ;)