replace all members in the 3915traffice@veyance.com distribution list with the 3915traffic@contitech.us member only input csv

Tammy Rule
Tammy Rule used Ask the Experts™
on
Sorry if this is a repeat as I didn't see my question listed.  I have this one liner -
Update-DistributionGroupMember -Identity 3915traffic@veyance.com -Members 3915traffic@contitech.us
to replace all members in the 3915traffice@veyance.com distribution list with the 3915traffic@contitech.us member only
Looking for some help in creating a script that will read in the other 385 distrib groups and associated member to replace from a csv file.
Thanks.

Thanks but is there a way to input the whole csv file in with all the distrib groups in - not just the -Identity of 3915traffic@veyance.com - but all the list?  like read in the whole file?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Active Directory/Exchange Engineer
Top Expert 2015
Commented:
Tammy,
YOu seem to already have it in control.
Create a folder named Temp on your C:drive
1.  List all the members of the 3915traffic@contitech.us by their email addresses in a .csv with a header named Users
save it as c:\temp\contitechusers.csv

Example:
Users
JohnDoe@contitech.us
ArtLinkletter@contitech.us

script:

Import-csv 'c:\temp\contitechusers.csv' | %{Update-DistributionGroupMember -Identity 3915traffic@veyance.com -member $_.Users -Confirm:$False}

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial