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

Getting information about another domain
Get-ADDomain -Identity remo.htb

Getting the domain SID
(Get-ADDomain).DomainSID

Getting information about domain controller
Get-ADDomainController

Getting information about domain controller of another domain
Get-ADDomainController -DomainName remo.htb -Discover

Getting information about the users in the domain.