Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting directory membership

Status
Not open for further replies.

bbuilder

Technical User
Aug 28, 2001
6
GB
Hi

Does anyone know a way to extract the memebership lits of groups within AD to notepad or excel?
 
CSVDE is your friend. The following command will export all groups in the domain along with their members:
Code:
csvde -f groups_users.csv -s domaincontroller -d "dc=yourdomain,dc=com" -p subtree -r "(objectClass=group)" -l "member"
 
Hi Crobin1

That seems to work, is there a way to easily tidy the info once in excel? The info need to go to my HR depart and i think they may have a problem deciphering the infomation.

Cheers
 
Search and replace. For example:
Find what: ,dc=yourdomain,dc=com
Replace With: leave the field blank
There are other ways to get the information, such as with VBScript, where you can clean up some of the information during the extraction, but I still find this to be one of the quickest ways to do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top