Sunday, June 20, 2010

List members of Group in Active Directory

# For Auditing your Active Directory
# Produces a list of People within a particular security Group
# In this case, "Domain Admins"
# By changing name of domain, you can query other child domains as well
#
# Requires Quest Active Roles

# Connect to Particular Domain, this is "CONTOSO.LOCAL" an internal Domain Name, but it could just as easily be
# 'ACCOUNTING.CONTOSO.LOCAL' or 'ALASKA.FABRIKAM.COM'

connect-qadservice -service 'contoso.local'
' '
#
# 'Domain Admins' can be replaced with any other Group name, including 'Enterprise Admins' or 'Bean Counters'
# should even work on Distribution Lists.
#
get-qadgroup 'Domain Admins' | foreach { $_.member }

No comments:

Post a Comment