Navigation Menu

Tuesday, 21 June 2016

Create Office 365 Group using Powershell

Office 365 Groups provide a platform for collaboration that enables teams to come together and establish a single team identity and a single set of permissions across different Office 365 apps including Outlook, OneDrive, OneNote, Skype for Business, Power BI and Dynamics CRM. In this article, I am going write powershell commands to create Office 365 Groups, add members and owners to an Office 365 Group.

Before proceed, first connect Exchange Online Powershell session by using the following commands.

We can use the PowerShell cmdlet New-UnifiedGroup to create a new Office 365 group. This cmdlet includes the following key parameters:

DisplayName – display name of the new groupAlias – Email alias of the group. If you omit the parameter, it will generate an alias by using display name.AccessType – Privacy type of the group (Public or Private)AutoSubscribeNewMembers – Add this parameter to auto subscribe new members to the group

The parameter Links accept multiple values, use the following syntax: value1,value2.... If the values contain spaces or otherwise require quotation marks, use the following syntax: "value1","value2",....

Add members to multiple office 365 groups:

Import office 365 group members from a CSV File:

You can use the below powershell commands to add members to an office 365 group by importing users from csv file. Consider the csv file members.csv that includes the column member which holds the member identity in each row of the csv file.