Purpose:

This script will query your server for whether Remote Server Admin Tools is already an installed windows feature. 

RSAT allows for the importation of the AD powershell module, and allows for the capability to manage the server remotely with powershell too. 

If it is not, then server manager module is loaded, and RSAT feature is installed, and the default return vaule is displayed showing success/failure.

If it is already installed a simple write host is returned showing that installtion has already occured. 

 

Please don't forget to rate my scripts. 

 

 

PowerShell
Edit|Remove
###################################################################### 
###Install RSAT and Enable Active Directory Module for Importation ### 
###################################################################### 
 
$RSATCheck= Get-WindowsFeature RSAT-AD-Powershell 
 
if (($RSATCheck.InstallState -eq "Available"-or ($RSATCheck.InstallState -eq "Removed")) 
{ 
    write-host "Need to Install RSAT" -ForegroundColor Yellow 
    Import-Module ServerManager 
    Add-WindowsFeature RSAT-AD-PowerShell 
    Import-module ActiveDirectory 
    write-host "" 
} 
 
Else 
    { 
     write-host "RSAT has previously been installed" -ForegroundColor Yellow 
     write-host "" 
    }