Forum Discussion
Shaun Hardneck
May 02, 2017Copper Contributor
Bulk add user to distribution group
Bulk add users to Distribution Group I was ask recently to simplify a task for support staff to bulk add users to a distribution group. So i created the following script to add user from csv. ...
Deleted
Nov 27, 2017Shaun Hardneck what would be the header in CSV file? Just Name?
Maris_M
Jan 15, 2019Copper Contributor
This script works for me:
$Dgroup = Read-Host 'Insert Distribution Group Name'
Import-Csv "C:\scripts\AddDistGroupMembers.csv" |
foreach{Add-DistributionGroupMember -Identity $DGroup -Member $_.email}
And the .csv file has a header "email"