In this part we will enumerate the domain using AD-Module.

Loading the Module

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

Untitled

Getting information about the domain

Get-ADDomain

Untitled

Getting domain SID

(Get-ADDomain).DomainSID

Untitled

Getting information about other domain (If there is trust)

Get-ADDomain -Identity moneycorp.local

Untitled

Getting information about the domain controller

Get-ADDomainController

Untitled

Getting information about other domain controller (if we have trust)

Get-ADDomainController -DomainName moneycorp.local -Discover

Untitled