maphew

Retrieve members of AD group

How to retrieve members and email of an Active Directory group in a re-usable format.

Locate dsget command line utility and put it in path.

Open an administrative command shell and:

dsget group "CN=mygroup,OU=mydepartment,OU=Users and Groups,DC=mydomain,DC=ca" -members |dsget user -samid -display -email
Article Image

date: 2011-01-18 tags: [howto]
category: HowTo