Link to home
Start Free TrialLog in
Avatar of nutekconsultant
nutekconsultant

asked on

Exchange 2010 Add Email Address to Distribution Groups

I have about 500 Distribution Groups and 700 Mail Contacts to whom I need to add a secondary email address to (the same email domain ie. @exchange.domain.com)
is there a script someone can post which can point me in the right direction?
SOLUTION
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can also create separate email address policy.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nutekconsultant
nutekconsultant

ASKER

Hi Jpower5000 - when I run the above command I get the following error.   I have edited the csv file to include Colomns as you mentioned, then copied/pasted the command

[PS] C:\Windows\system32>Import-CSV c:\distrotest.csv | ForEach {Set-DistributionGroup $_.Name -PrimarySmtpAddress @{add
=$_.alias}}


Cannot process argument transformation on parameter 'PrimarySmtpAddress'. Cannot convert the "System.Collections.Hashta
ble" value of type "System.Collections.Hashtable" to type "Microsoft.Exchange.Data.SmtpAddress".
    + CategoryInfo          : InvalidData: (:) [Set-DistributionGroup], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-DistributionGroup
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial