Provisioning bulk distribution lists

Its ideal to avoid distribution lists wherever possible and adopt Microsoft 365 groups instead however, we can’t apply it for every scenario as DLs are still very useful and in some cases the only option you have. This post will showcase the steps to provision DLs in bulk (in Exchange Online)

Steps:

1. Create a 3 column simple CSV file as shown below and save it locally in your PC as “DL_Pilot.csv”

Name 
Incidents 
Incidents 
Incidents 
Incidents 
AU_Group1 
AU_Group2 
AU_Group3 
AU 
Group4 
Type 
Distribution 
Distribution 
Distribution 
Distribution 
Email 
Incidents 
Incidents 
Incidents 
Incidents 
AU 
AU 
AU 
AU 
Groupl@mantasa.live 
Graup2@mantasa.live 
Graupa@mantasa.live 
Graup4@mantasa.live

2. Login to Exchange online PowerShell module

Connect-ExchangeOnline

3. Run the following command (set the location to match yours) and point the path to your previously created CSV file.

Import-CSV “C:\Official\Mantoso\DL_Pilot.csv” | foreach {New-DistributionGroup -Name $.name -Type $.Type -PrimarySmtpAddress $_.email}

That’s it. It’ll simply provision the DLs defined in the the CSV (sample below)

DL-Result