Add bulk users

Sree 1,971 Reputation points
2021-09-28T10:39:36.747+00:00

We have a hybrid environment in which DL's created in On Premis . We need to add bulk of users to the particular DL.

Please provide us with the Command to add bulk(400-500) users to Distribution list

Need instructions with detailed commandlets please

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Exchange | Exchange Server | Management
Exchange | Exchange Server | Management
The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
0 comments No comments
{count} votes

Answer accepted by question author
  1. KyleXu-MSFT 26,396 Reputation points
    2021-09-29T02:05:03.117+00:00

    @JustinMicheal-7973

    First, you need to know that due to this group is created on Exchange on-premises, you can only add Exchange on-premises mailboxes into it, you cannot add Exchange online created mailboxes to it.

    If you want to add multiple mailboxes into group in batch. You need to prepare a source file contains mailboxes that you want to add:
    136084-qa-kyle-09-55-21.png

    Then you will could use script below to add those mailboxes into the group that you wanted:

    $users = Import-Csv c:/temp/users.csv  
      
    foreach ($user in $users){  
        Add-DistributionGroupMember -Identity "Group" -Member $user.UserName  
    }  
    

    Here are detailed information about it:
    136095-qa-kyle-10-02-23.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.