Last second 3am scripting to add thousands of proxy addresses to public folders and running into this was a nightmare. I still have no idea why it errors out.
ForEach ($strPF in $arrPFs) {
$PF = Get-MailPublicFolder $strPF
$PF.EmailAddresses += $arrProxySMTPs[$i]
$PF | set-mailpublicfolder
$i++
}
value of $arrproxysmtps[$i] is simply an email address like asdf@asdf.com
if i test with a normal $variable with the same value it works. like $variable = asdf@asdf.com
$variable | get-member shows "system.string"
$arrproxysmtps[$i] | get-member shows "system.string"
Exception setting "EmailAddresses": "Cannot convert value "System.Object[]" to type "Microsoft.Exchange.Data.ProxyAddressCollection". Error: "Conversion from System.Management.Automation.PSObject to Microsoft.Exchange.Data.ProxyAddress has not been implemented.""
Proxies
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.