mwjones75
asked on
exporting all SMTP addresses from Exchange 2010
Hello Everyone... I have a script that I have used in the past that is now not giving me the Email addresses listed in the output under SMTP Adresses is blank......and am wondering if someone can see what I am doing wrong...
Get-mailbox -resultsize Unlimited | Select Name,PrimarySMTPAddress, RecipientTypeDetails, HiddenFromAddressListsEnab led -ExpandProperty EmailAddresses | Select Name, PrimarySMTPAddress, RecipientTypeDetails, HiddenFromAddressListsEnab led, SmtpAddress | Export-csv c:\temp\mark\smtpmbx090720 16.csv
Get-mailbox -resultsize Unlimited | Select Name,PrimarySMTPAddress, RecipientTypeDetails, HiddenFromAddressListsEnab
ASKER
thank you... I am however trying to get all SMTP addresses. I want to specify which is primary but want to pull All email addresses associated with each mailbox or recipient
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for this... I ended up needing to tweak a little but got what I needed .... had to go to recipients because we are now in Hybrid mode and the mailboxes that have been migrated dont show up under get-mailbox
[PS] C:\temp\Mark>Get-recipient -resultsize Unlimited | Select Name, PrimarySMTPAddress, RecipientTypeDetails, HiddenFromAddressListsEnab led -ExpandProperty EmailAddresses | Select Name, PrimarySMTPAddress, RecipientTypeDetails, HiddenFromAddressListsEnab led, SmtpAddress | Export-csv c:\temp\mark\smtpmbx0907.c sv
[PS] C:\temp\Mark>Get-recipient
ASKER
thanks!
Nice! I'll have to test your command out.
If you connect to Office 365 using PowerShell you can use Get-Mailbox for those specific mailboxes.
https://oddytee.wordpress.com/2013/03/21/connect-to-office-365-with-powershell/
If you connect to Office 365 using PowerShell you can use Get-Mailbox for those specific mailboxes.
https://oddytee.wordpress.com/2013/03/21/connect-to-office-365-with-powershell/
Using your command, I made a modification for you to try...
Open in new window
FYI... There is no SmtpAddress parameter for Get-Mailbox.