Add bulk users in exchange online distribution group

Gurudas 886 Reputation points

Hello Team,

Please provide me powershell command to add bulk users in the o365 exchange online distribution list.

Your quick help will be much appreciated.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,379 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,459 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. KyleXu-MSFT 26,241 Reputation points


    Glad to see you find this command.

    You could add those information below to that command, in this way, you don't need to confirm. Even if there is a problem with one mailbox, the script can still be run for other users.

    import-csv c:\temp\123.csv | foreach {Add-DistributionGroupMember -Identity "contoso_India" -Member $ -Confirm:$false -ErrorAction SilentlyContinue} -whatif  

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Andreas Baumgarten 103.9K Reputation points MVP

    Hi @Gurudas ,

    please take a look here:


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten

    0 comments No comments

  3. Gurudas 886 Reputation points

    Hello All,

    I got my answer in following kb article :

    Powershell: import-csv c:\temp\123.csv | foreach {Add-DistributionGroupMember -Identity "contoso_India" -Member $} -whatif

    Please create a csv file including all email address that needs to be added in distribution group and save it on c:\temp location

    0 comments No comments