Bulk import (csv) external contacts to a specific distribution list (365)

%3CLINGO-SUB%20id%3D%22lingo-sub-1413221%22%20slang%3D%22en-US%22%3EBulk%20import%20(csv)%20external%20contacts%20to%20a%20specific%20distribution%20list%20(365)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1413221%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20bulk%20import%20external%20contacts%2Frecepients%20(e.g.%20gmails%20etc)%20using%20a%20csv%20file%20to%20a%20specific%20distribution%20list%20named%20colleagues%20that%20I%20have%20already%20created.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20this%20article%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fbulk-import-external-contacts%3Fview%3Do365-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fbulk-import-external-contacts%3Fview%3Do365-worldwide%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20it's%20about%20bulk%20importing%20external%20contacts%20in%20general%20not%20in%20a%20specific%20distribution%20list.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1413221%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1413896%22%20slang%3D%22en-US%22%3ERe%3A%20Bulk%20import%20(csv)%20external%20contacts%20to%20a%20specific%20distribution%20list%20(365)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1413896%22%20slang%3D%22en-US%22%3E%3CP%3ERun%20the%20steps%20in%20the%20article%20to%20provision%20the%20contacts%20objects%20in%20your%20directory.%20Once%20that's%20done%2C%20you%20can%20add%20them%20all%20to%20a%20DG.%20Something%20like%20this%20should%20do%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EImport-CSV%20blabla.csv%20%7C%20%25%20%7B%20%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3EAdd-DistributionGroupMember%20DG%20-Member%20%24_.Emailaddress%3C%2FFONT%3E%20%7D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ewhere%20the%20csv%20file%20is%20named%20blabla.csv%20and%20it%20contains%20a%20column%20%22emailaddress%22%20to%20designate%20the%20external%20contact.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1414305%22%20slang%3D%22en-US%22%3ERe%3A%20Bulk%20import%20(csv)%20external%20contacts%20to%20a%20specific%20distribution%20list%20(365)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414305%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B.%3CBR%20%2F%3E%3CBR%20%2F%3EMay%20I%20ask%20you%20two%20things%20considering%20the%3A%3CBR%20%2F%3EImport-CSV%20blabla.csv%20%7C%20%25%20%7B%20Add-DistributionGroupMember%20DG%20-Member%20%24_.Emailaddress%20%7D%3CBR%20%2F%3E%3CBR%20%2F%3E1)%20Where%20should%20I%20write%20the%20distribution%20list%20name%20whereI%20want%20to%20add%20the%20emails%20%3F%3CBR%20%2F%3E2)%20I%20guess%20before%20the%20blabla.csv%20I%20have%20to%20type%20the%20path%2C%20right%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1414830%22%20slang%3D%22en-US%22%3ERe%3A%20Bulk%20import%20(csv)%20external%20contacts%20to%20a%20specific%20distribution%20list%20(365)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414830%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20the%20above%2C%20%22DG%22%20is%20the%20name%20of%20the%20group%2C%20you%20can%20also%20provide%20an%20email%20address.%20And%20yes%2C%20use%20the%20full%20path%20to%20the%20CSV%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

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:

https://docs.microsoft.com/en-us/microsoft-365/compliance/bulk-import-external-contacts?view=o365-wo...

 

but it's about bulk importing external contacts in general not in a specific distribution list.

 

Any ideas?

 

Thank you in advance.

3 Replies
Highlighted

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.

Highlighted

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.

Highlighted

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.