May 22 2020 11:10 PM
Hi there,
I would like to bulk import external contacts/recepients (e.g. gmails etc) using a csv file to a specific distribution list named colleagues that I have already created.
I found this article:
but it's about bulk importing external contacts in general not in a specific distribution list.
Any ideas?
Thank you in advance.
May 23 2020 10:34 AM
Run the steps in the article to provision the contacts objects in your directory. Once that's done, you can add them all to a DG. Something like this should do:
Import-CSV blabla.csv | % { Add-DistributionGroupMember DG -Member $_.Emailaddress }
where the csv file is named blabla.csv and it contains a column "emailaddress" to designate the external contact.
May 23 2020 09:24 PM - edited May 23 2020 09:25 PM
Thank you @Vasil Michev .
May I ask you two things considering the:
Import-CSV blabla.csv | % { Add-DistributionGroupMember DG -Member $_.Emailaddress }
1) Where should I write the distribution list name whereI want to add the emails ?
2) I guess before the blabla.csv I have to type the path, right?
Thank you again.
May 24 2020 08:13 AM
In the above, "DG" is the name of the group, you can also provide an email address. And yes, use the full path to the CSV file.
Sep 20 2021 10:26 AM
Oct 14 2021 07:59 AM