Hi Guys,
I have a number of distribution lists that I need to add an additional email address to for a secondary domain. I tried this -
import-csv "D:\pst\company\import\distalias2.csv" | foreach {get-distributiongroup $_.distalias -organization company | set-distributiongroup -emailaddressses @{add='$_.alias1'}}
the $distalias is the name of the distribution group and the $alias1 is the email address I am trying to add .
I get the following error
A positional parameter cannot be found that accepts argument 'System.Collections.Hashtable'.
+ CategoryInfo : InvalidArgument: (:) [Set-DistributionGroup], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Set-DistributionGroup
Can someone please point me in the right direction?