suelizy
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
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
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 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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Took about 10 secs on 1000 objects
Just tested it on my Exchange 2010 and it worked correctly