<

[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x

Creating Office 365 Groups with PowerShell

Published on
3,129 Points
129 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

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Join & Write a Comment

Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month