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:
DN | objectClass | cn | displayName | legacyExchangeDN |
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