- First make a CSV with 1 column called “PrimarySmtpAddress” populate with all the SMTP address of the users your adding to the distro (example below)
- Copy to the system that the command will be run on.
- Now run the following command in Exchange 2007 Powershell
import-csv C:\Distro1.csv | foreach {add-distributiongroupmember -id Distro1-member $_.PrimarySmtpAddress }
- Highlighted locations need to be modified to match the file and group names as this is just an example.
- Note: you can get the members with the following
Get-DistributionGroupMember Distro1.csv | Export-Csv C:\Distro1.csv
#TYPE Microsoft.Exchange.Data.Directory.Management.ReducedRecipient | |||
PrimarySmtpAddress | |||
2007user@domain.net | |||
2003user@domain.net | |||
2010user@domain.net |
To do this on a new group you can follow this article at exchangeteam.com
very helpful, saved me a lot of time. Thank you!
It’s realy helpful command