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 [email protected] (gcits.com.au is the default domain of our organisation)
New-UnifiedGroup -DisplayName "GCITS Team" -Alias team
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 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
Add-UnifiedGroupLinks -Identity team -LinkType Members -Links [email protected], [email protected]
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
Delete an Outlook Group
Deletes an Outlook Group with the alias of team.
Remove-UnifiedGroup -Identity team