The Remote Server Administration Tools (RSAT) used to be an external download that added two important PowerShell modules: ActiveDirectory and GroupPolicy. Unfortunately, major Windows updates removed installed RSAT tools so if your scripts require Active Directory cmdlets on your client, you were forced to manually identify and download the appropriate RSAT package for your new Windows 10 and install it manually.

This is somewhat easier now on Windows 10 Build 1809 and beyond. You can control RSAT status via PowerShell like this (provided you have Administrator privileges):

 
PS> Get-WindowsCapability -Online -Name *RSAT.ActiveDirectory*


Name         : Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0
State        : NotPresent
DisplayName  : RSAT: Active Directory Domain Services and Lightweight Directory Services Tools
Description  : Active Directory Domain Services (AD DS) and Active Directory Lightweight Directory Services (AD LDS) Tools include snap-ins and command-line tools for remotely managing AD DS and AD LDS on Windows Server.
DownloadSize : 5230337
InstallSize  : 17043386
 

To install RSAT, run this:

 
PS> Get-WindowsCapability -Online -Name *RSAT.ActiveDirectory* |
    Add-WindowsCapability -Online 


Path          : 
Online        : True
RestartNeeded : False




PS> Get-Module -Name ActiveDirectory -ListAvailable


    Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules


ModuleType Version    Name                                ExportedCommands                                                                                               
---------- -------    ----                                ----------------                                                                                               
Manifest   1.0.1.0    ActiveDirectory                     {Add-...
 

While you still have to download the RSAT package in some cases, you don’t have to search for the correct version and build manually any longer.


psconf.eu – PowerShell Conference EU 2019 – June 4-7, Hannover Germany – visit www.psconf.eu There aren’t too many trainings around for experienced PowerShell scripters where you really still learn something new. But there’s one place you don’t want to miss: PowerShell Conference EU - with 40 renown international speakers including PowerShell team members and MVPs, plus 350 professional and creative PowerShell scripters. Registration is open at www.psconf.eu, and the full 3-track 4-days agenda becomes available soon. Once a year it’s just a smart move to come together, update know-how, learn about security and mitigations, and bring home fresh ideas and authoritative guidance. We’d sure love to see and hear from you!

Twitter This Tip! ReTweet this Tip!

Anonymous
Parents
No Data
Comment
  • That cmdlet is kind of iffy, I have the AD module (and RSAT) installed on 2 different PCs which I use PowerShell constantly and both return NOT PRESENT, I'm guessing if you have installed the RSAT using Windows Update this gives the wrong result?

Children
No Data