Forum Discussion
Marvin Oco
Jul 01, 2019Iron Contributor
powershell script to export display name and primary smtp address of all users
what is the powershell script to export display name and primary smtp address of all users? thanks
Jul 01, 2019
Hi Marvin Oco
https://o365info.com/export-and-display-information-about-email-addresses-using-powershell-office-365-part-6-13/
See section - Export PowerShell command output to a CSV file
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,PrimarySmtpAddress,EmailAddresses,EmailAddresses | Export-CSV C:\Temp\"Exchange Online recipients.CSV" –NoTypeInformation -Encoding UTF8
Hope that helps
Best, Chris
https://o365info.com/export-and-display-information-about-email-addresses-using-powershell-office-365-part-6-13/
See section - Export PowerShell command output to a CSV file
Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,PrimarySmtpAddress,EmailAddresses,EmailAddresses | Export-CSV C:\Temp\"Exchange Online recipients.CSV" –NoTypeInformation -Encoding UTF8
Hope that helps
Best, Chris