Solved

Importing legacyexchangedn from csv file

Posted on 2008-10-30
6
1,666 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
ID: 22848671
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
ID: 22850943
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
ID: 22852871
"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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 33

Expert Comment

by:Exchange_Geek
ID: 22852884
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
ID: 22852971
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
ID: 22853316
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

The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
exchange, outlook 8 58
exchange, 2 19
Exchange 2007 Active Directory requiements 4 32
Move mailbox to new database 9 12
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
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…
how to add IIS SMTP to handle application/Scanner relays into office 365.

920 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