Recreating an X500 smtp address (LegacyExchangeDN)

Is there a way to recreate a mailboxes Exchange 2013 X500 smtp address? Someone edited some mailboxes and removed their X500 addresses so now senders receive the NDR that they cant find the recipients mailbox.

I know I can ask the senders to delete the cached contact in Outlook, but it may be easier, if possible, to simply recreate the X500 address once versus all the tickets we could receive from different senders.

I found these methods, but am curious, what if the NDR doesn't contain the X500 error...


1. Clear the cache by deleting the autocomplete entry when creating a new email.
                The problem with this method is it will not fix any replies users try to make to old emails which still exist in their mailboxes.

2. Create a new X500 record for the user based on the DNR error.
•      Replace any underscore character (_) with a slash character (/).
•      Replace "+20" with a blank space.
•      Replace "+28" with an opening parenthesis character.
•      Replace "+29" with a closing parenthesis character.
•      Delete the "IMCEAEX-" string.
•      Delete the "@mgd.domain.com" string.

Thanks in advance.
Christian HansAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hardik DesaiIT Architect and TrainerCommented:
You can check what is the legacyexchangedn pattern in your exchange org, basis which you can use a bulk AD modification utility to add X500 address.
0
Amit KumarCommented:
Please follow this article

Export the Legacy X500 Address

Powershell

Get-ADUser -SearchBase “OU=legacyusers,DC=domain,DC=local” -Filter * -Properties SamAccountName,legacyExchangeDN | Select-Object SamAccountName,legacyExchangeDN | Export-CSV C:\UserExport.csv -NoTypeInformation

Open in new window


or you can CSVDE:

CSVDE

CSVDE -s <domain controller FQDN> -d “OU=legacyusers,DC=domain,DC=local” -p SubTree -l SamAccountName,legacyExchangeDN -r objectClass=user -f C:\UserExport.csv

Importing the Legacy Exchange X500 Address to New Domain

On a domain controller or a machine with Active Directory Powershell module installed, copy the UserExport.csv to the root of the C:\ drive

Create a Powershell Script file called legacyusers.ps1. In this file type the following code

Import-Module ActiveDirectory

$Input = Import-CSV C:\UserExport.csv

ForEach ($ADUser in $Input){

if ($ADUser.legacyExchangeDN){

Set-ADUser -Identity $ADUser.SamAccountName -add @{proxyAddresses=”X500:$($ADUser.legacyExchangeDN)”}

}

}

Open in new window

Save the file and execute on the domain controller. You can check this has worked by opening an affected AD user object in the new domain and viewing the Attribute proxyAddresses to ensure that this has been added successfully.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Md. MojahidCommented:
Did you update oab.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.