PowerShell: Create a Distribution List with an Array
This script creates an Exchange Online distribution group and bulk-adds members to it using a PowerShell array and a foreach loop. It’s useful when you need to stand up a new distribution list with a known set of members without clicking through the Exchange admin center one address at a time.