How can I add x400 address using import-csv new-mailbox powershell script?
In csv, I added a mail2 column with the following value:
X400:c=GB\;a=xxx\;p=xxxx\;s=xxxx\;g=xxxx
and run the command;
PS P:\> Import-CSV "C:\NewU.csv" | foreach {New-Mailbox -Name $_.displayName -Alias $_.sAMAccountName -UserPrincipalName $_.userPrincipalName -samAccountName $_.sAMAccountName -OrganizationalUnit $_.OrganizationUnit -PrimarySmtpAddress $_.mail
-EmailAddresses @{add=$_.mail2} -FirstName $_.FirstName -LastName $_.LastNam
e -Password (ConvertTo-SecureString $_.password -AsPlainText -Force) -ResetPassw
ordOnNextLogon $false}
All works fine except adding the second x400 email address; -EmailAddresses @{add=$_.mail2}
Please help! Thanks in advance.