How to install or import Active Directory PowerShell module

IT Admins and Support they use a lot the Domain Controllers in day to day tasks like to create a new user , to unlock a user , to add a user in specific group. So every time must remotely connect to a Domain controllers. Microsoft has introduced RSAT(Remote Server Administration Tools) that can remotely manage Active Directory instead to remotely connect in a Domain Controller. 

Part of the RSAT is the PowerShell Active Directory module which include cmdlets to manage the Active Directory.

Let's see how can install the PowerShell module on Windows Server or Windows 10,11 step by step.

 

Install Active Directory PowerShell module on Windows Server

Install Active Directory PowerShell module on Windows Server with PowerShell

Install Active Directory PowerShell module on Windows 10

Install Active Directory PowerShell module on Windows 10  with PowerShell

Import Active Directory PowerShell Module

Import Active Directory PowerShell Module remotely

 

 

Install Active Directory PowerShell module on Windows Server

If you want to manage Active Directory from another Windows Server instead of the Domain Controller , then you must install the active directory PowerShell module.

So let's see together how can install it step by step.

  • Open the Server Manager
  • Click on Manage -- Add Roles and Features.
Install RSAT in Windows Server

 

 

  • Click Next on Welcome Screen.
Install RSAT in Windows Server

 

  • Select Role-based or feature-based installation. Click Next.

 

install active directory powershell module

 

  • Select the Server that you want to install the RSAT. Click Next.

 

install active directory powershell module

 

  • Don't change anything in the Server Roles and click Next.

 

install active directory powershell module

 

  • Scroll down to find and expand the Remote Server Administration Tools.
  • Expand the Roles Administration Tools.
  • Expand  the AD DS and AD LDS Tools.
  • Select the Active Directory module for Windows PowerShell. Click Next.

 

install active directory powershell module

 

  • In the Confirmation Click on Install.
install active directory powershell module

 

  • Wait until finish the  the Installation.

 

install active directory powershell module

 

  • You don't need to restart the Windows Server after the installation of the Active Directory PowerShell module

 

Install Active Directory PowerShell module on Windows Server with PowerShell

Let's see how can install the Active Directory PowerShell module with PowerShell

  • Open the PowerShell as Administrator
  • Search for the module name with the following command

Get-WindowsFeature | Where-Object displayname -like '*active directory*'

 

install active directory powershell module with powershell

 

  • Now run the following command to install the PowerShell active directory module

Install-WindowsFeature -Name RSAT-AD-PowerShell

install active directory powershell module with powershell

 

 

Install Active Directory PowerShell module on Windows 10

Microsoft until the update of October 2018 on Windows 10 you should download RSAT and install it. After the update of October 2018  the active directory module for windows PowerShell included by default in the Windows 10.

Installation before the October 2018 update

  • Download the RSAT from the Microsoft Download Center
  • Start the installation and follow the instructions. It's straightforward.
  • Restart your PC when the installation will finished.
  • Open the Control Panel.
  • Click on Programs and Features.
  • Click on Turn Windows Features On or Off from the left side .

 

 

  • Scroll down to find and expand the Remote Server Administration Tools.
  • Expand the Roles Administration Tools.
  • Expand  the AD DS and AD LDS Tools.
  • Select the Active Directory module for Windows PowerShell. Click Next.

 

 

  • Wait the installation until finish.

 

 

Installation after the October 2018 update

Now the installation it's easier because the RSAT already included in Windows 10

So the only that you need to do is

  • Click Start -- Settings
  • Select the Apps

 

install active directory powershell module on widnows 10

 

  • Select the Optional Features

 

install active directory powershell module on widnows 10

 

  • Click on Add a feature

 

install active directory powershell module on widnows 10

 

  • Scroll down and select the RSAT: Active Directory Domain Services and Lightweight Directory Services Tools.
  • Click on Install. Wait until to finish

 

install active directory powershell module on widnows 10

 

 

Install Active Directory PowerShell module on Windows 10 with PowerShell

The second option is to install the Active Directory powershell module with PowerShell.

It's quicker than the GUI option because you need only to run one command.

  • Open PowerShell as Administrator
  • Run the following command.

Add-WindowsCapability -Name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0 -Online

install active directory powershell module on widnows 10 with powershell

 

 

Import Active Directory PowerShell Module

Sometimes you have install the Active Directory PowerShell Module. However, you need to import the module before start to using it.

To import the the active directory module PowerShell you must run the following commands.

Use the commands to import the active directory module PowerShell.

Get-Module ActiveDirectory -ListAvailable.

Import-Module ActiveDirectory

import active directory module powershell

 

 

Import Active Directory PowerShell module remotely

Sometimes maybe need to install the active directory PowerShell  module remotely. A very common scenario is when need to install it in Windows Server Core.

In the above scenario or any other scenario that requested follow the steps

  • Open PowerShell as Administrator
  • Run the command to save a a new session in variable

$newsession=New-PSSession dcsrv1.askme4tech.com

  • Run the command to Import the Module locally from the session that you have open in a Server

Import-Module -PSSession $newsession -name ActiveDirectory

  • Check if the active directory PowerShell module imported.

Get-Module ActiveDirectory -ListAvailable

  • You should note that you must have the same PowerShell version in both Servers to run the above commands

 

import active directory powershell module

 

As you can see, it's very simple to install the active directory PowerShell module whichever method you choose.

Take care and have a nice day.