Question : Exchange 2007 Import multivalued proxyaddresses

I have a csv containing an alias, and a proxyaddresses field which was from an AD dump.

I need a script to ADD (not replace) all of the addresses listed in the proxyaddresses field.  Some only have a few addresses, some have many.

I have several hundred distributiongroups that I have to add these two so I don't want to do it by hand.

I have sampled the following below but it doesn't like the fact that it has multiple values in the proxyaddress field.

Import-CSV C:\bah8.csv | foreach {
$Temp = Get-DistributionGroup -identity $_.alias
$Temp.EmailAddresses += $_.proxyaddresses
set-distributiongroup -instance $temp}

I have also tried removing the smtp: and replacing the ; with a comma, but it still thinks it's invalid.
Please advise!

Answer : Exchange 2007 Import multivalued proxyaddresses

ahh, thanks

1:
2:
3:
4:
5:
Import-CSV C:\bah8.csv | foreach {
$Temp = Get-DistributionGroup -identity $_.alias
$proxys = $_.proxyaddresses.split(";")
foreach($p in $proxy) { $Temp.EmailAddresses += $p }
set-distributiongroup $temp -EmailAddresses $temp.emailaddresses }
Random Solutions  
 
programming4us programming4us