> For the complete documentation index, see [llms.txt](https://rfc1918.gitbook.io/offsec/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rfc1918.gitbook.io/offsec/active-directory/enumeration/active-directory-module.md).

# Active Directory Module

## Requirements

{% hint style="info" %}
This module interacts with AD through the Active Directory Web Service that mush be running on the domain controller.&#x20;
{% endhint %}

To check if ADWS is running:

```powershell
Test-NetConnection DC1 -port 9389
```

## Installing Active Directory module

### Installing on Windows 10 and 11

```powershell
Add-WindowsCapability -online -Name Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0    
```

### Installing on Windows Servers

You can check if the module in installed with:

```powershell
Get-WindowsFeature -Name "RSAT-AD-PowerShell"
```

To install:

```powershell
Install-WindowsFeature -Name "RSAT-AD-PowerShell" –IncludeAllSubFeature
```

## Running AD Module without RSAT or admin privileges

To be able to run Active Directory module without installing RSAT you only require the DLL location in`C:\Windows\Microsoft.NET\assembly\GAC_64\Microsoft.ActiveDirectory.Management` from a computer with RSAT installed.

We are then able to grab the signed DLL and drop it on the computer we want to enumerate from and simply import the DLL as a module:

```
Import-Module .\Microsoft.ActiveDirectory.Management.dll
```

{% hint style="info" %}
If you plan on zipping the DLL to transfer over, you will need to unblock the zip file before unzipping.&#x20;

```powershell
UnBlock-File .\ADModule.zip
```

{% endhint %}
