Installing ActiveDirectory Module

by Jan 23, 2020

Good news for any PowerShell users dealing with Active Directory: in recent Windows 10 builds (Enterprise, Professional), Microsoft included the RSAT tools so there is no additional download required. To use PowerShell commands for AD, simply enable the RSAT features (see below).

Plus, finally the Active Directory PowerShell module is natively supported in PowerShell 7! If you started to use the new PowerShell side-by-side with Windows PowerShell, you can now use all the AD cmdlets in PowerShell 7 that previously only worked in Windows PowerShell.

Run this in an elevated PowerShell to see the available RSAT components:

Get-WindowsCapability -Online | Where-Object Name -like Rsat* 

To use the ActiveDirectory and GroupPolicy PowerShell modules enable the RSAT features

Get-WindowsCapability -Online | Where-Object Name -like Rsat* | Where-Object State -ne Installed | Add-WindowsCapability -Online 

Once done, both the ActiveDirectory and GroupPolicy PowerShell modules are available in Windows PowerShell. In PowerShell 7, only the ActiveDirectory module can be used.

 PS> Get-Module -Name ActiveDirectory, GroupPolicy -ListAvailable Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Manifest 1.0.1.0 ActiveDirectory {Add-ADCentralAccessPolicyMember, Add-ADCom... Manifest 1.0.0.0 GroupPolicy {Backup-GPO, Block-GPInheritance, Copy-GPO...

 


You are a PowerShell Professional, passionate about improving your code and skills? You take security seriously and are always looking for the latest advice and guidance to make your code more secure and faster? You’d love to connect to the vibrant PowerShell community and get in touch with other PowerShell Professionals to share tricks and experience? Then PowerShell Conference EU 2020 might be just the right place for you: https://psconf.eu (June 2-5, 2020 in Hanover, Germany).

It’s a unique mixture of classic conference with three parallel tracks filled with fast-paced PowerShell presentations, and advanced learning class with live discussions, Q&A and plenty of networking.

Secure your seat while they last: https://psconf.eu/register.html.

Twitter This Tip! ReTweet this Tip!