Add multiple members to a distribution group in O365

To create bulk distribution groups at one time, and add multiple members to each distribution group, please take to the following steps:
1. Install and configure Windows PowerShell.
2. Connect Windows PowerShell to Exchange Online.
=========
Create bulk distribution groups at one time
1. Prepare a CSV file to import multiple distribution groups, and store it in local disk (for example, C:\distributiongroups.csv ).

For example:
Name, Type
Group1, Distribution
Group2, Distribution

Note:
Name represents display name of the distribution group.

2. Run the command below to bulk import several distribution groups:
Import-CSV “D:\distributiongroup.csv” | foreach {New-DistributionGroup -Name $_.name -Type $_.Type}

==========
Add multiple members to each distribution group
1.Prepare a CSV file to contain each user’s information, including Display name, Alias, E-mail address, and then store it in local disk (for example, D:\list.csv ).

For example:
Display name, Alias, E-mail address
Member1, member1, member1@contoso.com
Member2, member2, member2@contoso.com

2. Import the CSV file to Exchange Online via PowerShell.
Run the cmdlet:
Import-Csv “D:\list.csv” | foreach{Add-DistributionGroupMember -Identity “GroupName” -Member $_.alias}

Note:
GroupName represents the distribution group needs to be added members.
After those steps, you can create multiple distribution groups at one time, and add several users into them.

Advertisement

One thought on “Add multiple members to a distribution group in O365

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: