In this section, we will enumerate the Active Directory Using The AD Module.

Loading The AD Module.

Import-Module ActiveDirectory.psd1
. .\\Import-ActiveDirectory.ps1

Get current domain.

Get-ADDomain

Untitled

Getting information about another domain

Get-ADDomain -Identity remo.htb

Untitled

Getting the domain SID

(Get-ADDomain).DomainSID

Untitled

Getting information about domain controller

Get-ADDomainController

Untitled

Getting information about domain controller of another domain

Get-ADDomainController -DomainName remo.htb -Discover

Untitled

Getting information about the users in the domain.