Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Import x500 Exchange LegacyDN into Office 365

$
0
0

Good afternoon,

I need some help with importing legacyExchangeDN address' from our soon to be old Exchange 2010 email server to our new Office 365 subscription in order to avoid the inevitable bounce backs when internal email's are sent. 

I have exported the legacy information to CSV using:

CSVDE -f c:\x500.csv -r objectClass=user -l "objectClass,cn,displayname,mail,legacyExchangeDN" 


The columns in the CSV file are as follows:

DNobjectClasscndisplayNamelegacyExchangeDNmail


I have logged onto powershell and connected to MSOL and am trying to run the following script:

import-csv E:\Dropbox\Projects\FLM\x500.csv | foreach {$temp = Get-mailContact -identity $_.Name; $temp.EmailAddresses += "x500:" + $_.legacyexchangedn; Set-mailcontact -instance $temp}

The error I am receiving is:

Property 'EmailAddresses' cannot be found on this object; make sure it exists and is settable.
At line:1 char:99
+ ... ntity $_.Name; $temp.EmailAddresses += "x500:" + $_.legacyexchangedn; Set-mailco ...
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound


A parameter cannot be found that matches parameter name 'instance'.
    + CategoryInfo          : InvalidArgument: (:) [Set-MailContact], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Set-MailContact
    + PSComputerName        : pod51048psh.outlook.com

Any assistance will be greatly appreciated.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>