Microsoft AD Module
Tags:toolsscriptspowershellActive-DirectoryMicrosoft-AD-Module Related to:hackingbug-bountyTCMcrtposcpenumeration See also: Introduction to Active Directory , Powerview Index: 🗂️ Index of CRTP
Summary
How to setup and use Microsoft AD Module for AD enumeration
Microsoft AD Module
Where can it be used?
On a device connected to the AD environment.
How to setup?
Some commands
Make sure that you import AD Management.dll and AD.psd1 files using the powershell commands (1 and 2)
Import-Module .\Microsoft.ActiveDirectory.Management.dll
Import-Module .\ActiveDirectory\ActiveDirectory.psd1
Get-ADDomain
- Get current domain
Get-ADDomain -Identity <domain name>
- Get object of the mentioned domain (where we have trust to do so)
(Get-ADDomain).DomainSID
- Get domain SID for current domain
Get-ADDomainController
- Get domain controller details
Get-ADDomainController -DomainName <domain name> -Discover
- Get domain controller details for particular domain
Refer Enumeration Cheatsheet AD and Microsoft Reference Doc for more commands.