Jun 21 2021 04:53 PM
Hey Team,
I have a request to accomplish the following.
I have successfully taken care of the 1st step using this command:
$Importlist = Import-CSV Testlist.csv
foreach ($SingleImport in $importlist)
{
New-MsolUser -DisplayName $SingleImport.Name -Department "Agency OWNER - TSR" -UserPrincipalName $SingleImport.UPN -UsageLocation US -LicenseAssignment TenantNameUAT:STANDARDPACK -ForceChangePassword $False
}
The first part works as stated.
This part however does not work:
Set-Mailbox -identity $SingleImport.UPN -EmailAddresses "SMTP:$SingleImport.Email_id", "smtp:$SingleImport.UPN"
All i want to do with the above command is to: 1) Add a new SMTP Address, and set the new address as reply-to.
Error Text: Cannot process argument transformation on parameter 'EmailAddresses'. Cannot convert value "System.Collections.ArrayList" to type "Microsoft.Exchange.Data.ProxyAddressCollection".
If i try using the @Add{SMTP:address} it fails with the error stating that another address is already set as reply.
I just cant seem to get past the Array Error.
Thanks,
Robert
Jun 22 2021 12:08 AM
Jun 22 2021 06:25 AM
Jun 22 2021 08:22 AM
Solution