Die Installation von RSAT Tools bei Windows 10 erfolgt nicht mehr über die Features in der Systemsteuerung, sondern wird über WSUS Windows Update oder per Windows 10 ISO installation durchgeführt.
Am sichersten ist der Weg über die Powershell mit einer ISO Image. Das folgende Powershell Beispiel installiert die RSAT Tools nur für PC Clients mit Windows 10.
#Script: Install_RSAT_Tools_1903.ps1
#Version: 1.0 / 23.08.2021
#Autor: Michael Haug
#Kodierung: ANSI
#
Set-ExecutionPolicy RemoteSigned -force
$version="1.0"
$pcname=$env:computername
$mount_point=""
$logfilename=$pcname +"_ps1.log"
$logfile = "C:\service\LOG\"+$logfilename
$Datum +" "+ "Info: RSAT Tools Installscript: $version is starting..." >> $logfile
Write-Host "Install Log will write to: $logfile" -ForegroundColor Gree
$ISO_SOURCE = "\\MeinPfad\"
$ISO_FILE_1903 = "SW_DVD9_NTRL_Win_10_1903_64Bit_MultiLang_FOD_1_X22-01658.ISO"
$ISO_PATH_1903 = $ISO_SOURCE + "\" + $ISO_FILE_1903
# Win Version ermitteln
$osversion= get-computerinfo -property 'osname'
#Nur auf Windows 10 Clients installieren
if($osversion -like "*Microsoft Windows 10*") {
$rstat_status= Get-WindowsCapability -Name "Rsat.ActiveDirectory*" -Online | Select-Object -Property State
if($rstat_status -notlike "*Installed*") {
Write-Host "Install RSAT for Windows 1903 and 1909..." -ForegroundColor Gree
$Datum +" "+ "Install RSAT for Windows 1903 and 1909..." >> $logfile
Write-Host "Try mount for: ISO:$ISO_PATH_1903" -ForegroundColor Gree
$mountResult = Mount-DiskImage $ISO_PATH_1903 -PassThru
$mount_letter = ($mountResult | Get-Volume).DriveLetter
$mount_point = $mount_letter + ":\"
Write-Host "ISO:$ISO_PATH_1903 is mounted to $mount_point " -ForegroundColor Gree
$Datum +" "+ "ISO is mounted to $mount_point " >> $logfile
if($mount_letter -like "" ) {
Write-Host "ISO Mountpoint konnte nicht ermittelt werden $mount_letter" -ForegroundColor Red
$Datum +" "+ "ISO Mountpoint konnte nicht ermittelt werden $mount_letter" >> $logfile
}
Get-WindowsCapability -Online -Source $mount_point | ? Name -like "*RSAT*" | Add-WindowsCapability -Online -Source $mount_point
$Datum +" "+ "Info: RSAT Tools are installed Script-Version: $version" >> $logfile
} else{
Write-Host "Info: RSAT Tools still installed - nothing to do... bye bye" -ForegroundColor Magenta
#$Datum +" "+ "Info: RSAT Tools still installed - nothing to do. Script-Version: $version" >> $logfile
}
}else {
#Nur fuer Debug
#$Datum +" "+ "Info: OS:" +$osversion +"+ ist kein Clientbetriebsystem - Abbruch" >> $logfile
}