Bulk Add Users to an Office 365 Distribution Group with PowerShell
Question details
Add multiple users to an Office 365 distribution group using a CSV file and 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.
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.
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.
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.
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.
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.
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.
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.

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.

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.




