Solved

Importing legacyexchangedn from csv file

Posted on 2008-10-30
6
1,657 Views
Last Modified: 2011-09-20
My company has split from it's parent organization and I am migrating our users to a new 2007 Exchange server. I have a csv file of (new) smtp addresses and the old legacyexchangedn data to import into the new Exchange attributes. I would like to have the users be able to reply to migrated emails and continue to function seamlessly with existing calendar appointments.

Can anyone tell me the correct syntax to import a file with smtp address and add the old x500 information?
0
Comment
Question by:susjdavis
  • 4
  • 2
6 Comments
 
LVL 33

Expert Comment

by:Exchange_Geek
Comment Utility
you got it exactly right that X500 should be added as legacyexchangedn value for replying to old emails (emails sent to you when mailboxes existed in previous organization)

However, this x500 value needs to be added in proxyAddresses - in other words your email address gets modified with another secondary email address added. No need to panic since this is an X500 address and not a modification to primary SMTP address. Mentioned below are the steps taken using the tool ADMODIFY to make bulk user changes.

JUST A WORD OF CAUTION:
PLEASE READ CAREFULLY BEFORE MAKING CHANGES TO ALL USERS, YOU MAY WANT TO WORK WITH ONE USER TO CHECK BEFORE IMPLEMENTING WITH ALL.


1] Open ADModify.NET with an account that has Domain Admin permissions and select Modify Attributes
2] From the Domain List: drop down box, choose the Domain you will work with.
3] From the Domain Controllers List: drop down box, choose the Domain controller you will work with.
4] Place or remove checkmarks to select the mail enabled objects you wish to modify.
5] Select the arrow to the right to search the domain.
6] From the search results select the OU you want to work with and select, Add To List->
7] You can highlight individual Users from the details pane on the right or choose Select All.
8] Select NEXT; a new screen will appear, select the CUSTOM Tab
9] Under Custom Attribute Set, place a check mark by: Make a customized modification
10] By Attribute Name: enter: proxyAddresses
11] By Attribute Value: enter the X500 address

For example, if you want an X500 address of:
/o=OldOrganization/ou=OldSite/cn=Recipients/cn=mailNickName

Then for Attribute Value enter:
X500:/o=OldOrganization/ou=OldSite/cn=Recipients/cn=%'mailnickname'%

In this example the %'mailnickname'% variable is used because it is assumed that
the Users mailnickname attribute, in the new Organization, matches the mailnickname
attribute in the old Organization. If not, other variables can be used for this
value.

12] In order to add the X500 proxy address to the existing proxyAddresses place a
check mark by: Multivalued Append
13] Select GO!
0
 

Author Comment

by:susjdavis
Comment Utility
Unfortunatley - there is no standard on the old x500 addresses for the %nickname% field. I have at least three differnent naming conventions coming from the old exchange org and none of the three match the current (firstinitiallastname) alias in the new AD domain.
I had found the following on the net explaining how to import via a csv file if you had the correct alias and legacyExchangedn:

Import-CSV file.csv | foreach {

$Temp = Get-Mailbox -identity $_.alias

$Temp.EmailAddresses += X500 + $_.legacyexchangedn

set-mailbox -instance $temp}

http://blogs.technet.com/mbaher/archive/2008/02/17/auto-complete-reply-ability-i-need-my-x500.aspx

However - I'm not 100% on using the smtp address as the unique identifier instead of the alias name.
I'm also getting errors when trying to test the script at the $temp.emailaddresses.
0
 
LVL 33

Expert Comment

by:Exchange_Geek
Comment Utility
"Unfortunately - there is no standard on the old x500 addresses for the %nickname% field. I have at least three differnent naming conventions coming from the old exchange org and none of the three match the current (firstinitiallastname) alias in the new AD domain"

Look, it seems either you are confused or i am feeling sleepy. X500 over the years has always been used in context with mailNickname attribute. This attribute derives from only one attribute that is ALIAS.

The change i asked you to make using adsiedit was keeping in mind that your present alias would match your previous Org alias.

What you are stating that you have THREE naming convention - this is practically impossible - since Exchange would pickup ONLY ALIAS Attribute for its own mailNickname - You cannot have 3 types of alias and mailNickname.

The fact that i wanted to share these steps with you was - since this has worked without an hitch on previous occasions.

Yes, if you current alias is different then your script would also Fail - i would also answer that why.

Import-CSV file.csv | foreach {

$Temp = Get-Mailbox -identity $_.alias <=== This is trying to store the present alias
(which as per you is not the same as previous organization) - so why proceed to step2

$Temp.EmailAddresses += X500 + $_.legacyexchangedn <==== This is storing the legacyexchangedn value with x500 attached to it. - LegacyExchangeDN would require mailNickname at the end of its value.

set-mailbox -instance $temp}
At this point probably you are trying to merge both the information. Which should be incorrect since you stated.

"I have at least three differnent naming conventions coming from the old exchange org and none of the three match the current (firstinitiallastname) alias in the new AD domain."


I am again stating please do not confuse between mailNickname attribute and email address - Both these are different.
Email address derive their proxyaddress from recipient polices.
mailNickname derives its presence from alias and helps further only in legacyExchangeDN value.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 33

Expert Comment

by:Exchange_Geek
Comment Utility
And yes i did confirm with my colleagues in MSFT - your script and my method are practically the same.
Just that i would be using the GUI and script would show you the shell interface.
0
 

Author Comment

by:susjdavis
Comment Utility
My organization has gone through at least three cross-organization exchange migrations in the past few years. Currently, the mail boxes are being hosted on another domain at a hosting facility.

The legacyExchangeDN on the hosted mailboxes "nicknames" are from the trusted domain and not the domain I will be migrating into. They range from firstname.last, firstname lastname, firstname, firstinitiallastname, etc. These mailboxes have been migrated several times.

My question is - is there a way to MODIFY the above script to pull in legacyexchangedn from a csv file with two columns:
smtp address (since I do not have the correct alias')
and
legacyExchangeDN
0
 
LVL 33

Accepted Solution

by:
Exchange_Geek earned 500 total points
Comment Utility
Not to a limit i am aware of. You may open a case with MSFT for this - but i doubt they can do anything better on such scenarios.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now