Question : Active Directory queries to pull distribution list members and user email addresses

I need to produce two different reports, but I'm not sure how I can do this efficiently/easily:

1. I need to generate a list of all of the distribution groups in my domain, including their members.

2. I need to generate a list of all users on my domain, including their email addresses. The vast majority of my users only have one email address, but some have multiple email addresses. This is the case with people who have recently been married, their main email address is [email protected] but they still have their old address (say for example, [email protected]) as an alias.

I know how to list groups and users using csvde but this doesn't seem to allow me the level of detail that I need. I'm doing this in a Windows 2003 environment. Any recommendations?

Answer : Active Directory queries to pull distribution list members and user email addresses

I like using adfind by Joe Richards for this sort of thing

http://www.joeware.net/freetools/tools/adfind/index.htm

Michael Smith has a great blog entry for #1  http://theessentialexchange.com/blogs/michael/archive/2007/11/13/listing-members-of-distribution-lists-and-security-groups.aspx

For #2

adfind -default -f  "&(objectcategory=person)(objectclass=user)" samaccountname givenname sn mail proxyaddressex -csv -nocn > c:\allusers.csv

See if that gives you what you need

Thanks

Mike
Random Solutions  
 
programming4us programming4us