• Download our FREE True Price of Office 365 Whitepaper
  • Give us a call: 877-788-1617

    Stay in the know with the MessageOps newsletter:

    Tech Tip | Creating Office 365 Distribution Groups by CSV and Adding Members by CSV

    Save time when creating and adding members to Office 365 distribution groups by CSV with scripts

    When you’re creating and adding members to Office 365 distribution groups by CSV in Office 365, it can be very time consuming to go one by one. Using the scripts below can help you save time and frustration when creating and adding members to distribution groups by CSV.

    Scenario:

    An organization is migrating from another email environment and would like to create their distribution groups on Office 365.

    Solution:

    • Create Distribution Groups

    Script:
    Import-CSV “C:\CSG\distributiongroup.csv” | foreach {New-DistributionGroup -Name $_.name -Type $_.Type}

    Example Of CSV:
    Create a CSV, below is the name if the DG you are creating and set the type to distribution.

    Office 365 Distribution Groups

     

    • Add Members to Distribution Group

    Script:
    Import-Csv “C:\CSG\addmem1.csv” | foreach{Add-DistributionGroupMember -Identity $_.identity -Member $_.members}

    Example Of CSV:
    Make sure that the members have the identity next to it “NAME OF THE DISTRIBUTION GROUP THEY ARE GOING TO BE A MEMBER OF”

    Office 365 Distribution Groups

     

    Use these scripts to save time and frustration when creating and adding members to Office 365 distribution groups by CSV.  For more MessageOps Tech Tips to improve your Office 365 experience, click here.

    Ready to get started? Contact us today to learn more.

    CONTACT US