Update LegacyExchangeDN Attribute for Mail-Enabled Users / Contacts | LegacyExchagneDN attribute is missing from Mail-Enabled Contacts | Exchange Mail Contacts Problem | Emails are not going for Adress Book Contacts
Posted by Zahir Hussain Shah
Author: Zahir Hussain Shah | MVP Exchange Server, CISSP
Update and Populate LegacyExchangeDN Attribute for Exchange Mail-Enabled Contacts
This is my second blog post for the Microsoft Exchange Server Mail-Enabled Contacts, recently in my first blog post for the same subject, where we discussed the GAL Synchronization issues for Mail-Enabled Contacts using MIIS 2003 (Legacy IDM Solutions) with Windows Server 2008 Active Directory and Exchange Server 2010, and Troubleshooting the legacyExchangeDN attribute missing problems for Mail-Enabled Contacts, but here I will provide you some of the basic troubleshooting steps, which you can use as preliminary steps for troubleshooting your Exchange Mail-Enabled Contacts, and populate the necessary LegacyExchagneDN attribute for the Mail-Enabled objects, for the proper flow of emails to these Mail-Enabled Objects.
In my first blog post for this series, we performed some advance troubleshooting steps, because we saw that we were not able to populate the LegacyExchangeDN attribute for the Mail-Enabled Contacts, due to the high number for courrpted mail contacts, which were causing the Get-Mail-Contact resultsize unlimited | Set-Mail-Contact CMDLet to perform the operations, so therefore we had to use ADModify for forcefully appending the legacyExchangeDN attribute for these contacts.
This blog post will also help in the case, where you want to schedule the automatically updating and populating the LegacyExchangeDN attribute for newly created Mail-Contact by the legacy IDM Software, like MIIS 2003, which does not by default populate the LegacyExchangeDN, so what will be doing with the below CMDLets to first find out the ones, which doesnt have the attribute populated, and then we will generate the LegacyExchangeDN attribute for these newly created contacts.
Lets first find out, which are the newly created contacts, which doesn’t have LegacyExchangeDN attribute:
| [PS] C:Windowssystem32>Get-MailContact -ResultSize unlimited -OrganizationalUnit “ho.domain.com/GAL” -Filter { LegacyExchangeDN -eq $null } |
Lets assume that the above command provided a list of newly created contacts, which are out of legacyExchangeDN, so in this case, we would like to configure the LegacyExchangeDN attribute for them, so our Outlook users can send emails to them, and for achieving this, run the below EMS CMDLet:
| [PS] C:Windowssystem32>Get-MailContact -ResultSize unlimited -OrganizationalUnit “ho.domain.com/GAL” -Filter { LegacyExchangeDN -eq $null } | Set-MailContact |
I hope with this blog post, you will be able to fix your legacyExchangeDN population problem.
Cheers!

About Zahir Hussain Shah
Systems Infrastructure Consultant, Systems Solution Architect, Senior Systems Engineer. Certifications: MCSE, MCTIP Entperprise AdministratPosted on 07/03/2012, in Active Directory, AD DS, ADModify, Exchange 2007, Exchange 2010, GAL Sync, NDR, Server Migration, Windows Server 2008 R2, Windows Server 8 and tagged Active Directory, Address Book, Exchange Server, legacyExchangeDN, Mail-Enabled Contacts, Troubleshooting. Bookmark the permalink. 3 Comments.






hi,
So funny..
exactly the same case, the same technology (live@edu).. and the same issue… and the same fix ! (get-mailuser / set-mailuser in my case…)
Thanks a lot !!
Hi just used users and computers attribute editor to change my LegacyExchangeDN from
/o=ORGDOMAIN/ou=First Administrative Group/cn=Recipients/cn=ronnie.jorgensen
to
/o=ORGDOMAIN/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=ronnie.jorgensen
Replicated AD and reopened outlook. It could not connect. created a new outlook profile and everything is now working. do you have to create a new outlook profile after changing LegacyExchangeDN on a mail-enabled user?
Pingback: Clear Submission Queue on Microsoft Exchange Server 2007 / 2010 | Remove message from queue on Hub Transport Server | Delete ambigous messages from submission queue | Emails are stuck in the Exchange Server queue | Troubleshooting Exchange Queue « Z