Sam247 Posted February 4, 2014 Posted February 4, 2014 Morning all, I've been tasked with clearing out all of the unnecessary distribution groups in our Exchange which we believe are no longer used. However, the powers that be want a distribution group set up to include all of the email addresses from the deleted groups. I've got a CSV of all the email addresses but need help in getting this over to exchange. Does anyone have a nice powershell script to help? Thanks in advance Sam
ascott2 Posted February 7, 2014 Posted February 7, 2014 Assuming that you already have a blank distribution group set up and a csv something like this address,name [email protected],Joe Bloggs [email protected], John Smith Something like this should work $emails = Import-CSV C:\emailaddresses.csv foreach($email in $emails){ $newemail = $email.address Set-Distributiongroup -emailaddresses @{Add=$newemail} } This has not been tested but should at least set you on the right path.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now