PowerShell ADModule

AD powershell Module

Get information about current domain, its child domain, its forest, current domain's domain controller and other info

Get-ADDomain

Gets same info as above for another domain or forest in this case is forest.

Get-ADDomain -Identity moneycorp.local

Gets min/max password age, min password length, Clear text password, complexicity, etc.

Get-ADDefaultDomainPasswordPolicy

Gets info like Max ticket age, max service age, max renew age, etc. Here in attacks like golden ticket we may want to keep max ticket or max renew age as default shown in the output to bypass defense.(Some detection tools check this if max ticket or renew age is greater than default domain policy).

Get-ADDefaultDomainKerberosPolicy

password policy for chosen domain

Get-ADDefaultDomainPasswordPolicy -Identity "moneycorp.local"

kerberos policy for chosen domain forest in this case

Get-ADDefaultDomainKerberosPolicy -Identity "moneycorp.local"

Get the name and ip address of the domain controller

Get-ADDomainController

Gets the ip address and domain controller of another domain in this case forest

User Enumeration

Get all users with their default properties

Get all users with all properties

Gets information about specific user with all its properties

Get usernames of all domain users and their logoncount and passwordlastset

Search for particular string in a user's attribute

Get Domain Admins

Computer Enumeration

Get all computer objects

Get all computer objects with all properties

Get computer objects with specific os

Get domain computer and check if it can be reached or not

Group Enumeration

Get all groups in current domain

Get all groups with all properties

Get all groups of target domain

Get all groups containing word admin in group name

Get all members of Domain Admins group

Get group membership for a user

List all local groups on a machine(needs administrator priv on non-dc machines)

Get members of the above local group "Administrators" on a machine(needs administrator priv on non-dc machines)

Logon Enumeration

This requires administrative rights on target computer

Get actively logged users on a computer

Get locally logged users on a computer

Get last logged user on a computer

Forest Enumeration

Get details about current forest

Get details about another forest

Get all domains in the current forest

Get all domains in another forest

Get all global catalogue for current forest

Last updated