Others

Bulk Add Users to an Office 365 Distribution Group with PowerShell

Tauseeq MagsiTauseeq Magsi Nov 14, 2026 868 views

Question details

Add multiple users to an Office 365 distribution group using a CSV file and PowerShell.

Bulk Add Users to an Office 365 Distribution Group with PowerShell
Product
Exchange Online PowerShell
Device & OS
not provided
Scenario
An administrator wants to import a list of recipients and add them to an existing distribution group.
Observed behavior
The goal is to add the listed recipients to the group without entering each member individually.
Before you start

Confirm that the distribution group exists, that each user is an existing Exchange recipient, and that your account has permission to manage group membership. Prepare a CSV file with an Alias column containing one recipient alias per row.

Solution 1Recommended

Import a CSV and add members with Exchange Online PowerShell

Use this method to add recipients from a CSV file to an existing distribution group.

This method applies to Exchange distribution groups. Microsoft 365 groups use different membership commands.

1
Prepare the CSV file

Create a CSV file such as C:\temp\new.csv with the header Alias and one existing recipient alias on each following row. Replace the example path with your file's path.

2
Connect to Exchange Online

Open PowerShell and run Connect-ExchangeOnline, then sign in with an account authorized to manage the group. If the command is unavailable, install the module with Install-Module ExchangeOnlineManagement -Scope CurrentUser and then run Connect-ExchangeOnline.

3
Optionally export current members

To review the current membership, run Get-DistributionGroupMember -Identity "dlname" -ResultSize Unlimited | Select-Object Alias,PrimarySmtpAddress | Export-Csv -Path "C:\temp\current-members.csv" -NoTypeInformation. Replace dlname and the output path as needed.

4
Add the listed members

Run Import-Csv "C:\temp\new.csv" | ForEach-Object { Add-DistributionGroupMember -Identity "dlname" -Member $_.Alias }. Replace dlname with the distribution group's identity and the path with your CSV file.

5
Check the results

Run Get-DistributionGroupMember -Identity "dlname" -ResultSize Unlimited to review the membership. Check any errors in the PowerShell window for invalid aliases, existing members, or permission issues.

Import a CSV and add members with Exchange Online PowerShell
Existing members: Adding someone who is already a member can produce an error. Review the output and correct any entries that were not added.
Free Microsoft Office alternative

Prepare distribution group CSV files with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility. Use WPS Spreadsheets to prepare your recipient list and save it as CSV, then use Exchange Online PowerShell to manage the group.

Organize recipient aliases in a spreadsheet before exporting a CSV fileOpen and edit Microsoft Excel XLSX files for easy migrationUse a familiar spreadsheet interface to review listsWork with a free, lightweight office suite
QA img-9

Frequently Asked Questions

What should the CSV file contain?

Add a column named Alias and put one existing Exchange recipient alias on each row. The PowerShell command reads each value through $_.Alias.

How do I identify the distribution group?

Replace dlname in the commands with an identity that Exchange Online can resolve, such as the group's alias or email address.

Why is Connect-ExchangeOnline not recognized?

The Exchange Online PowerShell module may not be installed. In PowerShell, run Install-Module ExchangeOnlineManagement -Scope CurrentUser, then run Connect-ExchangeOnline.

Can I use the same command for a Microsoft 365 group?

No. Add-DistributionGroupMember is for distribution groups. For a Microsoft 365 group, use the Exchange Online Add-UnifiedGroupLinks cmdlet with the appropriate group and member identities.

How can I confirm that the users were added?

Run Get-DistributionGroupMember -Identity "dlname" -ResultSize Unlimited and compare the results with your CSV. Review any errors shown during the import.