VBScript - Export a list of all Mailboxes with their home Server, Storage Group and Database.
View Script (right click to download)
This script uses an LDAP query to return all mailbox enabled users and identifies which server, storage group, and mailbox store their mailbox resides in. The vbscript split function seperates these values from the homeMDB property. The script also uses the proxyAddresses property to include each associated email address in the export file. The result is a tab delmited text file that can be opened in Excel listing the Display Name, Server, Storage Group, Mailbox Store, and Email Addresses. Openning the text file in Excel and using the autofilter function allows you to easily work with the results.
benoit said,
May 2, 2007 @ 4:10 am
Thanks
Luka said,
December 11, 2007 @ 10:07 pm
Thanks a lot
Bobjan said,
February 14, 2008 @ 3:55 am
This Script is Good.
can you help in extending the same to display Entire forest, it’s showing only Id’s in Domain.
Thanks,
Bobjan
Ben Christian said,
February 14, 2008 @ 10:00 pm
Cheers Bobjan. Because the users reside in specific domains, you need to query each domain to return the information for them. The easiest way to do what you want would be to run the script for each domain and then combine the results (it’s possible to have the script iterate through a list of domains and output the results from each but I don’t have time to test that for you at the moment!)
This partilcar script uses the RootDSE object to get the current domain (i.e the domain that the user running the script is logged into). I tend to use this method to avoid hard-coding domain names, but in your case you will want to specify each domain in your forest.
All you need to do is change the code slightly, and then run the script for each of your domains.
Remove the following lines of code:
Set rootDSE = GetObject(”LDAP://RootDSE”)
DomainContainer = rootDSE.Get(”defaultNamingContext”)
And replace them with:
DomainContainer = “dc=yourdomain,dc=com”
Basically, if one of your domains is called yourdomain.com then the above code will work, you could go ahead and run that script and then change it again for your other domain(s). For example, If another on of your domains was called yourotherdomain.com.au then you would use:
DomainContainer = “dc=yourotherdomain,dc=com,dc=au”
And then run the script again.
Let me know how you go with that..
Cheers, Ben.