Get a list of all SMTP addresses from exchange (not just mailboxes)
I have seen several ways to get a complete list of all SmtpAddresses for mailboxes but I have not yet seen any way to get a list of all SMTP addresses for a Exchange system including Mailboxes, Aliases, Mail Enabled Public folders.
Is there a way to do this before I go re-inventing the wheel to create one?
thanks,
-Drew
October 21st, 2010 3:53pm
Hi,
If it exchange 2007 then have a look into this article : http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/getting-mailbox-statistics-exchange-2007.html
Do let us know is this didn't help.Ripu Daman Mina | MCSE 2003 & MCSA Messaging
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 4:34pm
Hi,
If it exchange 2007 then have a look into this article : http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/getting-mailbox-statistics-exchange-2007.html
Do let us know is this didn't help.
Ripu Daman Mina | MCSE 2003 & MCSA Messaging
I don't see how that article even remotely relates to what I asked about.
October 21st, 2010 5:50pm
Hi,
Sorry my bad, try this for exchange 2007/2010 : Get-Mailbox -resultsize unlimited | select Name -expand emailaddresses | Select
SmtpAddressRipu Daman Mina | MCSE 2003 & MCSA Messaging
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 6:13pm
Hi,
Sorry my bad, try this for exchange 2007/2010 : Get-Mailbox -resultsize unlimited | select Name -expand emailaddresses | Select
SmtpAddress
Ripu Daman Mina | MCSE 2003 & MCSA Messaging
Thanks for the tip, but I already have that information.
I need the smtp addresses for mail enabled public folders, aliases, etc as well...
October 21st, 2010 6:52pm
Hi,
Have a look into this article it might help : http://www.petri.co.il/forums/showthread.php?t=18464, it say's: If
you have Windows Server 2003, you use the tools in 'Saved Queries' to create the query.http://www.petri.co.il/saved_queries...s_2003_dsa.htm
Finish your 'saved query' in ADU&C. Then with 'Edit', you can select and copy the query string;
It will be something simular like this;
(&(objectCategory=person)(objectClass=user)(mail=* ))
You can use the 'filter' above with DSQUERY
Start | Run:
Code:
cmd /c dsquery.exe * -limit 0 -filter "(&(objectCategory=person)(objectClass=user)(mail=*))" -attr name mail >"c:\PrimaryEmailAddresses.txt"
After hitting the Enter key a new file will be created containing each user's fullname and primary emailaddress.
About the same results you can get when using CSVDE:
Start | Run:
Code:
cmd /c csvde.exe -r "(&(objectCategory=person)(objectClass=user)(mail=*))" -l name,mail -f "c:\PrimaryEmailAddresses.csv"
(skip cmd /c if you are running the command-line from a dos prompt)
more tools:
LDAP Query Basics
Daxxian gave an excellent tip how to study the Attributes. You have to know them for the output. There for in the dsquery example replace -attr name,mail with -attr * to output all the
attributes of the user objects. In csvde skip -l name,mail .
Ripu Daman Mina | MCSE 2003 & MCSA Messaging
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 8:09pm
On Thu, 21 Oct 2010 15:52:56 +0000, aweaver6142 wrote:
>Sorry my bad, try this for exchange 2007/2010 : Get-Mailbox -resultsize unlimited | select Name -expand emailaddresses | Select SmtpAddress
>Ripu Daman Mina | MCSE 2003 & MCSA Messaging
>
>Thanks for the tip, but I already have that information.
>
>I need the smtp addresses for mail enabled public folders, aliases, etc as well...
Use "get-recipient" instead of "get-mailbox".
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
October 22nd, 2010 3:50am
You can use this cmd:
Get-recipient -resultsize unlimited | select Name -expand emailaddresses > c:\emails.txt
or this:
Get-recipient -resultsize unlimited | select Name -expand emailaddresses | Select SmtpAddress > c:\emails.txt
Tore Jacobsen
Free Windows Admin Tool Kit Click here and download it now
June 6th, 2011 5:29pm