none
Add users to DL RRS feed

  • Question

  • Hi All

    I am using exchange hybrid environment, myonprem exchange is 2010,  I have Distribution List on Exchange onprem(onpremdl@contoso.com) and Exchange online(CloudDL@contoso.com) and i have 200 users in csv file and i need to add these users to onprem dl and online dl. i have users in the csv file in the below format. experts guide me with the powershell syntax to add

    users
    user1@contoso.com
    user2@contoso.com
    user3@contoso.com
    Tuesday, December 10, 2019 7:21 AM

Answers

  • Hi,

    You can use the following command to add distribution list members from a csv file:

    Import-CSV C:\location\user.csv | ForEach {Add-DistributionGroupMember -Identity <DL name> -Member $_.users} Get-DistributionGroupMember -Identity <DL name>

    If you want to add members for distribution list on Exchange online, please make sure all on-premises AD accounts have been synced to O365.

    Regards,

    Lydia Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, December 11, 2019 3:18 AM
    Moderator