Enumerating Active Directory

Returning Groups

Get-ADgroup <group name>

Returning Group Members

Get-ADGroupMember <Group name> <--- Returns all the users of a group

Returning users that belong to similar groups

Get-AdGroup -Filter{<object> -like "<group name>*"} | Select-Object name,samaccountname

Theory: With powershell we can continously feed the original command into new commands with the pipe (" | ") key. With this we can get a list of groups that have similar access, then feed that into a Get-ADGroupmember which will return all the users in those groups.

Last updated