Deploy RSAT (Remote Server Administration Tools) for Windows 10 v1809 using SCCM (System Center Configuration Manager) and Powershell

Introduction

Attention: This script has been updated and superseded: https://www.imab.dk/deploy-rsat-remote-server-administration-tools-for-windows-10-v1903-using-sccm-system-center-configuration-manager-and-powershell/

Continuing on the Windows 10 1809 journey from wednesday! As something completely new, RSAT (Remote Server Administration Tools) is now included as a set of “Features on Demand” in Windows 10 itself and is no longer something you download and install separately.

You can obviously install the tools manually in Windows (this is done from the settings menu and from there select to Manage Optional Features), but as always, we don’t like to do stuff manually. Therefore I created a complete Powershell script which can be used in SCCM (System Center Configuration Manager) in an unattended and automated deployment.

Powershell

The script requires administrative rights as well as access to the Internet (RSAT is installed through Microsoft Update).

The script is built around Get-WindowsCapability, Add-WindowsCapability and Remove-WindowsCapability.

The script comes with 4 options:

  • .\Install-RSATv1809.ps1 -All (-All is installing ALL the features within the RSAT bundle)
  • .\Install-RSATv1809.ps1 -Basic (-Basic is only installing AD DS, DHCP, DNS, Group Policy Management and Server Manager)
  • .\Install-RSATv1809.ps1 -ServerManager (-ServerManager is only installing the Server Manager)
  • .\Install-RSATv1809.ps1 -Uninstall (-Uninstall removes all RSAT features again)

Download

Download the complete script on the TechNet Gallery using below link.

>> https://gallery.technet.microsoft.com/Install-RSAT-for-Windows-75f5f92f <<

Configuration Manager

Put the script to use in SCCM in either a package or an application. (I’m assuming everyone knows how to create either a package or an application) 🙂

Installation program: powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File .\Install-RSATv1809.ps1 -Basic

Uninstall program: powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File .\Install-RSATv1809.ps1 -Uninstall

The script is creating registry keys in HKLM for you to use as detection methodFind below the snippet of the registry keys being created. Modify directly in the script to suit your own needs.

$RegistryPath = "HKLM:\Software\imab.dk"

# Adding registry key for detection method in SCCM
if (-NOT(Test-Path -Path $RegistryPath)) {
    New-Item -Path $RegistryPath –Force
}

New-ItemProperty -Path $RegistryPath -Name "1809RSATInstalled" -Value 1 -PropertyType "String" -Force

For your convenience, I have included a few snippets of the application in my environment. See below.

And once the application is deployed, you will have something similar as my example below.

Finally, once installed, you will find all your favorite tools in the start menu:

ENJOY 🙂

10 thoughts on “Deploy RSAT (Remote Server Administration Tools) for Windows 10 v1809 using SCCM (System Center Configuration Manager) and Powershell”

  1. Never works for me. Even when running the command line on a machine logged in as local admin, it says that it requires elevation.
    How do you get elevation by using Configmgr?

    Reply
    • Hey, you get that by running the application as system 🙂 Take a closer look on your deployment type and the user experience tab: Installation behavior -> Install for system
      Also, there’s a difference between being logged on as a local admin and running a process elevated. Being a local admin does not necessarily mean that everything is elevated (to run powershell elevated, you need to right click powershell and select Run as administrator.)

      Reply
  2. This is great thank you for this. I am getting an issue with the uninstall. when it runs and it gets to Removing “Rsat.activedirectory.ds-lds.tools” I am getting the error that a permanent package cannot be removed. is there a way around this?

    Reply
  3. All,
    2 Things:
    1. Detection logic for SCCM. I would like to determine if ANY tool installed
    Try the following, use a powershell detection
    $Installed = Get-WindowsCapability -Online | Where-Object {$_.Name -like “Rsat*” -AND $_.State -eq “Installed”}

    if ($Installed -ne $null) {
    Write-Host “Installed”
    }

    else {

    }
    2. Error in code:
    I am trying to install just Server Tools. Command line should install with ‘.\RSAT Tools Inst.ps1’ -ServerManager
    Fails with empty variable
    Line 153 Change $Item.Name to $Name.Name

    Reply
  4. Getting Detection method errors. I have used the power shell script and the Registry entry and both giving detection method

    Reply
  5. #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

    That’s works for me to install RSAT on W10 v1903.

    Reply
    • So it seems your update service is broken, and thus unable to download and install RSAT from MS 🙂 thanks for sharing.

      Reply

Leave a Comment

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