In some migration scenarios it is necessary to export all legacyExchangeDN addresses from your Exchange environment. This is for example the case if you are doing a mail migration with .pst files. If you are migrating from a Hosted Exchange environment this information can sometimes be hard to get. However, there are solutions.
It is quite easy to export all legacyExchangeDN addresses from the Global Address List using Access and Outlook on a client that is connected to the Exchange environment.
Start by opening Access and create a new empty database.
On the External Data tab select Outlook Folder
In the Import Guide select to import data into a new table, and click OK
Select your Outlook profile
Now select the address list to export from, in this case I select the Global Address List to get all addresses.
In the next step it is possible to adjust the data, just click Finish.
Now we’re done! A new table has been added to the database, and in the E-mail address column you will see the legacyExchangeDN for all users
Now it is easy to add these addresses as a x500 alias addresses in your migrated mailboxes.
/ Andreas