Proxies

Ask your PowerShell-related questions, including questions on cmdlet development!
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.
This topic is 15 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
mipbar
Posts: 1
Last visit: Wed Apr 30, 2008 7:08 am

Proxies

Post by mipbar »

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.""
This topic is 15 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked