Posts

Showing posts from April, 2022

365 - Export Legacy X500 to CSV

Image
Open Powershell as an Administrator and process the following to connect to your 365 tenant: $UserCredential = Get-Credential Enter in 365 admin and credentials when prompted  $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection Import-PSSession $Session Export command 365: Get-Mailbox | Select Name, PrimarySMTPAddress, legacyExchangeDN | Export-Csv C:\Source\Address\X500.csv -NoTypeInformation   Output will look similar to this: With this output you can then modify as necessary for import into another AD or 365 tenant if doing a  tenant to tenant or other email migration and reduce unnecessary non-delivery errors.