Kristopherw
Nov 12, 2019Copper Contributor
How to bulk add external recipients to an Office365 Distribution List?
Hello,
I'm trying to add our email addresses (external addresses) to a Distribution List in Office365.
I've followed this link https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-bulk-add-external-recipients-to-an/765999cf-51ff-4674-a5b9-a4e95d85292b and got to #2 in the powershell code below. However, in powershell I am getting the error message The '<' operator is reserved for future use , after I paste line 2. Any ideas?
- $Members = Import-Csv D:\ExternalContacts.csv
- $Members | ForEach {Add-DistributionGroupMember -Identity <TestDL> -Member $_.DisplayName}
- Get-DistributionGroupMember -Identity <TestDL>
- That cmdlet is gathering the data from Displayname column from the CSV (-Member $_.DisplayName), you will need to change the column or the script.
eg:.
$Members | ForEach {Add-DistributionGroupMember -Identity TestDL -Member $_.ExternalEmailAddress}