Note: Before proceed, Connect Exchange Online Remote PowerShell.
Then run the below powershell command to list the mailbox users and its primary email address.
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,PrimarySmtpAddressThe following command export all the exchange online users and its associated email addresses to csv file.
Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,PrimarySmtpAddress, @{n="EmailAddresses";e={$_.EmailAddresses | Where-Object {$_ -like "smtp*"} | ForEach-Object {$_.Substring(5)}}} | Export-Csv "C:\\o365-email-addresses.csv" -NoTypeInformation -Encoding UTF8
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. find contact details
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free.
ReplyDelete