Skip to Content
Communication Square LLC Help Center

Create multiple Unified Groups using CSV file

Written October 2020. Microsoft changes these admin screens often, so the screenshots below may not match what you see today. The sequence of steps is usually still correct — if something looks wrong, tell us and we'll update it.

Description:

This script is used to create unified groups(For Exchange) using a CSV file

This script use CSV file which sould contain the following columns:

-DisplayName: Name of the unified group

-EmailAddresses: Emails of the Unified Groups

-AccessType: Public or Private

-Owner: Owner of the Unified Group

-Members: Member of the Unified group (please see other article on our how to's section which explains how to add members in already present unified groups) 

Script:

Install-Module -Name AzureAD

Connect-AzureAD

Install-Module -Name Msonline

Connect-MsolService

Import-Csv -Path "C:\Users\tv\Desktop\office365.csv" | foreach {

New-UnifiedGroup -DisplayName $_.Name -EmailAddresses $_.UPN  -AccessType $_.Type -Owner $_.Owner -Members $_.Members}

Last updated on