Install all RSAT tools via PowerShell

You can use the following one line of PowerShell to easily install all of the available Remote Server Administration Tools (RSAT) in one go. I end up running this after every Windows feature update., Saves wasting time with a GUI.

Open an admin PowerShell prompt

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

Individuals Tools

If instead you only want to install a single tool or a small number. This command will give you a list of all of the available RSAT tools

Get-WindowsCapability -Name RSAT* -Online

You can then install the individual tool using

Add-WindowsCapability –online –Name “<tool name>”

i.e

Add-WindowsCapability –online –Name “Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0”

Checking the install status

This command will show which tools (if any) you currently have installed

Present = Installed

Not Present = Not installed

Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State

4 thoughts on “Install all RSAT tools via PowerShell”

  1. Minor issue with your command syntax.

    Take a look at the “-Online” after Add-WindowsCapability and compare it to the other “-Online”. One is a regular hyphen, the other is an em dash (long dash). When you try to paste it into PowerShell, the em dash doesn’t translate properly.

    Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability –Online

    Reply
  2. Seen some people with issues. They cant get the windows updates because of the WSUS server.
    Everywhere on the internet they disable the update server with powershell:

    Set-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU” -Name “UseWUServer” -Value 0
    Restart-Service wuauserv

    BUT this doesn’t always works, also check the Cachesets:

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache

    Under this reg. are internal domain servers too.

    example for Powershell to disabled them so you can use the Windows Update servers again:

    Set-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\CacheSet001\WindowsUpdate\AU” -Name “UseWUServer” -Value 0
    Restart-Service wuauserv

    Set-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\CacheSet002\WindowsUpdate\AU” -Name “UseWUServer” -Value 0
    Restart-Service wuauserv

    etc.

    If that doesn’t work just delete(write them down) the servers there(instead of disableing) and try again.

    Reply
  3. It probably is pretty common to have two cache sets but PS can figure this out for you…

    Get-Item -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\*” | foreach {
    $CashSet = $_.PSChildName
    Get-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\$CashSet\WindowsUpdate\AU” -Name UseWUServer
    }

    # Set to 0 to disable Cache
    Get-Item -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\*” | foreach {
    $CashSet = $_.PSChildName
    Set-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\$CashSet\WindowsUpdate\AU” -Name UseWUServer -Value 0
    }

    Restart-Service -Name wuauserv -Force

    # Reset to 1 to enable Cache
    Get-Item -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\*” | foreach {
    $CashSet = $_.PSChildName
    Set-ItemProperty -Path “HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\GPCache\$CashSet\WindowsUpdate\AU” -Name UseWUServer -Value 1
    }

    Restart-Service -Name wuauserv -Force

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.