CGNET-TE
asked on
Bulk error -creating external contacts in Exchange O365
Hi,
I am trying to import 600 contact to the cloud using this command below :
Import-Csv .\ExternalContacts.csv|%{N ew-MailCon tact -Name $_.Name -DisplayName $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName
The CSV only contain these entries:
Name FirstName LastName ExternalEmailAddress
I checked all the entries and there is not empty entries but when I run the command it saw this error at the end. Any idea will be appreciated!
Invoke-Command : Cannot bind parameter 'Name' to the target. Exception setting
"Name": "The property value is invalid. The value can't contain leading or trailing whitespace."
At C:\Users\Lilxx\AppData\Loc al\Temp\tm p_0b1a7f54 -5061-47c5 -84f9-0fad a19f412f
_gdlhupqx.ux3\tmp_0b1a7f54 -5061-47c5 -84f9-0fad a19f412f_g dlhupqx.ux 3.psm1:236 17
char:29
+ $scriptCmd = { & <<<< $script:InvokeCommand `
+ CategoryInfo : WriteError: (:) [New-MailContact], ParameterBind
ingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Mic rosoft.Exc hange.Mana ge
ment.RecipientTasks.NewMai lContact
Thanks
Libet
I am trying to import 600 contact to the cloud using this command below :
Import-Csv .\ExternalContacts.csv|%{N
The CSV only contain these entries:
Name FirstName LastName ExternalEmailAddress
I checked all the entries and there is not empty entries but when I run the command it saw this error at the end. Any idea will be appreciated!
Invoke-Command : Cannot bind parameter 'Name' to the target. Exception setting
"Name": "The property value is invalid. The value can't contain leading or trailing whitespace."
At C:\Users\Lilxx\AppData\Loc
_gdlhupqx.ux3\tmp_0b1a7f54
char:29
+ $scriptCmd = { & <<<< $script:InvokeCommand `
+ CategoryInfo : WriteError: (:) [New-MailContact], ParameterBind
ingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Mic
ment.RecipientTasks.NewMai
Thanks
Libet
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER