How to Add Bulk Users to Distribution Group in Office 365 via PowerShell
This blog helps admins add multiple members to the distribution group using PowerShell. The script accepts bulk users through import CSV and adds those users to the distribution list. Note: This script uses the PowerShell cmdlet Add-DistributionGroupMember. Before running the script, you must install the Exchange Online Management module. Connect-ExchangeOnline Import-CSV <FilePath> | foreach { $UPN=$_.UPN Write-Progress -Activity "Adding $UPN to group… " Add-DistributionGroupMember –Identity <GroupUPN> -Member $UPN If($?) { Write-Host $UPN Successfully added -ForegroundColor Green } Else { Write-Host $UPN - Error occurred –ForegroundColor... Read More Read More
Exchange Online