<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Creating Office 365 Groups with PowerShell

Published on
3,467 Points
467 Views
Last Modified:
Shaun Hardneck
Passionate and Experienced IT Professional with experience in Microsoft Exchange Messaging and Office 365 solutions.
In this post, I will showcase the steps for how to create groups in Office 365.
Office 365 groups allow for ease of flexibility and collaboration between staff members.

Creating Office 365 Groups with PowerShell


To get started a PowerShell session to Exchange Online needs to be established.


The following script can assist in connecting to Exchange Online quickly: https://gallery.technet.microsoft.com/office/Connect-To-Office-365-9b235018


Now that a session to Exchange Online has been established, now we can go ahead and run the following cmdlet to create the new group.


New-UnifiedGroup –DisplayName “Global-Ex-Support” –Alias GlobalExSupport


As you can see above the group has been created, however we have not specified if it should be a private or public group. By default the group is created as an empty public group with the owner as the admin user who created the group. Let’s go ahead and change the group's AccessType and add additional members to the group.


To set the group to private the following cmdlet can be used.


Set-UnifiedGroup –Identity GlobalExSupport –AccessType Private


So, the group GlobalExSupport has now been changed to private. Let’s go ahead and add some members to the newly created group.


To add members to the group the following cmdlet and be used.


Add-UnifiedGroupLink –Identity GlobalExSupport –LinkType Member –Links Farren@ThatLazyAdmin.com, Renjith@ThatlazyAdmin.com


How do you change the group owner once a group has been created already by another staff member?


To add an additional owner to the group, the following cmdlet can be used.


Add-UnifiedGroupLink –Identity GlobalExSupport –LinkType Owner –Link Farren@ThatLazyAdmin.com


To list the group members the following cmdlet can be used.


Get-UnifiedGroupLinks GlobalExSupport –LinkType Member


To list the group owners the following cmdlet can be used.


Get-UnifiedGroupLinks GlobalExSupport –LinkType Owner


To remove a group owner the following cmdlet can be used.


Remove-UnifiedGroupLinks –Identity GlobalExSupport –LinkType Owner –Links Farren.Prag


Now that we have looked at how to remove a group owner, let’s look at how to remove a group member as well.


To remove a group member the following cmdlet can be used.


Remove-UnifiedGroupLinks –Identity GlobalExSupport –LinkTypeMember –Links Renjith.VC


To wrap it up, we have gone through the creation and modification of an Office 365 group. Hope you got something out of it.



#ThatLazyAdmin


0
Comment
0 Comments

Featured Post

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Join & Write a Comment

Discover the basics of using Outlook 2016 from office 365.
Microsoft Office 365 Backup and Restore Solution by SysTools to export Office 365 mailbox to PST / EML file format on Windows OS. On Mac, tool backup O365 to PST / MBOX / MSG / EML / EMLX file formats. Not only this, restore option helps to import s…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month