Exporting GAL to Excel

I want to export the GAL from exchange, we have around 7 domains in the forest all over the world.
ive managed to export the entire GAL for the forest through adding all the GAL contacts to a PST then exporting to excel.

How do I export the gal for each domain so I can have a list of email addresses for each site.
I tried using CSVDE but its not very good and I have to log on to 7 different domain controllers to get the list and it pull off everything not just usernames and email addresses.

Can anyone help. Ive seen IMI GAL exporter but im not willing to spend £50 on this.

thanks guys.
Who is Participating?
neopumpkinConnect With a Mentor Commented:
if you've set your forest up so that your DC has a copy of each domain, you'll be able to run the query from 1 single DC.  

to run a query, open up AD on your DC.  at the top left hand corner, you should see "Saved Queries" right beneath the title "AD Users and Computers".  Right Click on Saved Queries, select New and select Query.  In here, give your search query a name and description and click the "Define Query" button.  in here you can define a query based off of 1 domain, or multiple domains, mail-enabled user accounts, etc.

here's a good write up on using the embedded AD query function:  http://www.windowsecurity.com/articles/Using-Saved-Queries.html

let us know if you have any questions!  thanks and good luck!

ajwukTechnical Consultant / Project ManagerCommented:
This blog should help: http://www.intermedia.net/support/kb/default.asp?id=1211

Once you have the GAL as a private contacts folder you can do a normal export to CSV format.

Exchange 2007?

PS: Solving your problem isn't worth 50 quid to you? Oh dear ..
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

ajwukTechnical Consultant / Project ManagerCommented:
Ignore that, apologies, I didn't fully read your description.
you can open AD and configure an "AD query" based upon your search criteria.  for your case, you would do a search of all mail-enabled accounts in 1 single domain or multiple domains.  export it into a .csv file and open in excel - wa lah!
allawygAuthor Commented:
how would I do an AD query?
adfind might suffice .. adfind /help or google
allawygAuthor Commented:
what kind of command would i use to speicfy mailbox users only and to specify which domain.

is it like CSVDE I have to do this command on each DC ? thats what I want to avoid
allawygAuthor Commented:
The query did bring up what I was looking for and exported fine, so thank you for that info.
I forgot to mention that I need a list to show display name and email address, this query only showed up the display name when exported.

I decided just to log on to each DC and run a csvde -r "(objectClass=user)" -d "dc=london,dc=domain,dc=local" -l displayName,mail -f c:\London.csv
and had to filter it to show only anything with an email address.

thanks guys for your help anyways.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.