Export All Office 365 Users Proxy Addresses To A .CSV File

Following my new Office 365 PowerShell User Management series and Yesterday’s post , Today I’ll blog about how to export all O365 Users Proxy Addresses to a .CSV file.

This task might sound simple but In reality PowerShell can’t export multi-valued attribute to a .CSV file without creating a custom table.

Luckily I developed the script below that will Export all Office 365 users and all their Proxy Addresses to a .CSV file:

Before you start,  connect to Office 365 first and run the script:

Get-MsolUser -all | Select-Object displayName, @{L = "ProxyAddresses"; E = { $_.ProxyAddresses -join ";"}} |Export-Csv -Path .\Export\all.csv -NoTypeInformation