Managing Outlook Groups via PowerShell

Outlook Groups (also known as Office 365 Groups) are a great way to work as a team in Office 365. They bring group conversations and a calendar from Exchange Online, files from OneDrive, and a notebook from OneNote into a single unified experience.

They integrate seamlessly into Outlook and the Outlook Web app, and can also be accessed via the dedicated mobile apps for Apple, Android and Windows devices.

When connected to Exchange online via PowerShell, you can manage Outlook Groups via the UnifiedGroups cmdlets.

Here are some common cmdlets you can use to retrieve, create, edit and delete your Outlook Groups. To use these cmdlets, you must first connect to Exchange Online.

Create an Outlook Group

This creates an Outlook group with a Display Name of GCITS Team, and an email address of team@gcits.com.au (gcits.com.au is the default domain of our organisation)

New-UnifiedGroup -DisplayName "GCITS Team" -Alias team

New Outlook Group Via PowerShell

 

Get Current Outlook Groups

This cmdlet retrieves a list of Outlook Groups that exist in our organisation. Use this to find the group alias, which is useful when working with the other cmdlets.

Get-UnifiedGroup

Get Outlook Groups Via PowerShell

 

Get all details for an Outlook Group

This cmdlet returns all details of the group with an alias of team.

Get-UnifiedGroup -Identity team | fl *

 

Add members to an Outlook Group

In this example we’re adding the users blair@gcits.com.au and james@gcits.com.au as members of the group team.

Add-UnifiedGroupLinks -Identity team -LinkType Members -Links blair@gcits.com.au, james@gcits.com.au

 

Get all members of an Outlook Group

Retrieve all members of an Outlook Group using the Get-UnifiedGroupLinks cmdlet. Replace team with the relevant group name.

Get-UnifiedGroupLinks -Identity team -LinkType Members

Get Members Of Outlook Groups Via PowerShell

Delete an Outlook Group

Deletes an Outlook Group with the alias of team.

Remove-UnifiedGroup -Identity team

Was this article helpful?

Related Articles