Forum Discussion
Robert Bollinger
Jun 21, 2021Brass Contributor
set-mailbox script, Reply To email address
Hey Team, I have a request to accomplish the following. Create several hundred user accounts , license them. set the smtp address on each of the users mailboxes list of names coming from...
- Jun 22, 2021It's not formatted properly, you are referencing a property of an object in there, and the quotes complicate things. Instead of "SMTP:$SingleImport.Email_id", use something like "SMTP:$($SingleImport.Email_id)"
VasilMichev
Jun 22, 2021MVP
Use the -WindowsEmailAddress parameter, it will set the address you specify as the primary SMTP one, while keeping the old one as secondary alias:
Set-Mailbox user@domain.com -WindowsEmailAddress new@domain.com
Set-Mailbox user@domain.com -WindowsEmailAddress new@domain.com
Robert Bollinger
Jun 22, 2021Brass Contributor
Thanks Vasil. I will give that a try. However can you explain why i got that error message? I would really like to understand why my script didn't work.
Interestingly if i type this:
Set-Mailbox -identity first.last@domain.com -EmailAddresses "SMTP:emailaddy1@domain.com", "smtp:emailaddy1@domain.com" - it works.
I just can't quite figure out why i get this error message:
Cannot process argument transformation on parameter 'EmailAddresses'. Cannot convert value "System.Collections.ArrayList" to type "Microsoft.Exchange.Data.ProxyAddressCollection".
or what the error message really means. if not that's fine too. always appreciate your assistance.
Interestingly if i type this:
Set-Mailbox -identity first.last@domain.com -EmailAddresses "SMTP:emailaddy1@domain.com", "smtp:emailaddy1@domain.com" - it works.
I just can't quite figure out why i get this error message:
Cannot process argument transformation on parameter 'EmailAddresses'. Cannot convert value "System.Collections.ArrayList" to type "Microsoft.Exchange.Data.ProxyAddressCollection".
or what the error message really means. if not that's fine too. always appreciate your assistance.
- VasilMichevJun 22, 2021MVPIt's not formatted properly, you are referencing a property of an object in there, and the quotes complicate things. Instead of "SMTP:$SingleImport.Email_id", use something like "SMTP:$($SingleImport.Email_id)"