Link to home
Start Free TrialLog in
Avatar of suelizy
suelizyFlag for United States of America

asked on

dumping all email addresses for exchange 2007 mailboxes

I need to dump the email addresses for my exchange users.  Some have more than one address and I need all of them in the dump.  I have tried:  
    get-user jane.Doe | select name, proxyaddresses and get-user jane.Doe | select name, emailaddresses
   The name field dumps as expected, but no email addresses get dumped.  

I need this to include mailboxes and contacts.

Thanks for any help!

Susan
Avatar of Dave Stringfellow
Dave Stringfellow
Flag of United Kingdom of Great Britain and Northern Ireland image

Have a look at this: http://www.exchangepedia.com/2005/09/how-to-export-all-email-addresses-from-a-domain.html

Just tested it on my Exchange 2010 and it worked correctly
Avatar of suelizy

ASKER

I did find that, but there is a lot of code in that one.  We have about 67,000 objects that will have to be queried.  How long did it take you to run it?  How many objects did it have to query?

I have gotten closer, I can dump it to the powershell screen with:  Get-Mailbox | fl Name, PrimarySMTPaddress, Emailaddresses

I cannot get it to dump to file.  I have tried adding these, but the data does not dump.
     | Export-CSV "c:\proxy.csv" and
     | >c:\proxy.txt

Thanks!

Susan
I think this will do what you want:
(Get-Mailbox),(get-mailcontact)| %{$_} | Select-Object -ExpandProperty emailaddresses | Select-object -expandproperty smtpaddress

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of soostibi
soostibi
Flag of Hungary image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Took about 10 secs on 1000 objects