Last updated on Oct 8, 2019
Create Office 365 Groups using PowerShell
In this post, I will show case the steps for how to create a Groups in Office 365. Office 365 Groups allows for ease of flexibility and collaboration between staff members.
More about Office 365 Groups can be found Here.
To get started a PowerShell session to Exchange Online needs to be established.
The following script can assist by 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.
1 |
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 and by default the Group is created as a Public Group with the Owner as the admin user who created the Group and no Members, so let’s go ahead and change the Group AccessType and add additional Members to the Group.
To set the Group to Private the following cmdlet can be used.
1 |
Set-UnifiedGroup –Identity GlobalExSupport –AccessType Private |
So, the Group GlobalExSupport has been changed to a Private, now let’s go ahead and set and Add some Members to the newly created Group.
To add Members to the Group the following cmdlet and be used.
1 |
Add-UnifiedGroupLinks –Identity GlobalExSupport –LinkType Member –Links <a href="mailto:Farren@ThatLazyAdmin.com,Renjith@ThatlazyAdmin.com">Farren@ThatLazyAdmin.com, Renjith@ThatlazyAdmin.com</a> |
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.
1 |
Add-UnifiedGroupLinks –Identity GlobalExSupport –LinkType Owner –Link <a href="mailto:Farren@ThatLazyAdmin.com">Farren@ThatLazyAdmin.com</a> |
To list the Group Members the following cmdlet can be used.
To list the Group Owners the following cmdlet can be used.
1 |
Get-UnifiedGroupLinks GlobalExSupport –LinkType Owner |
To remove a Group Owner the following cmdlet can be used.
1 |
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.
1 |
Remove-UnifiedGroupLinks –Identity GlobalExSupport –LinkType Member –Links Renjith.VC |
To wrap it up, we have gone through the creation and modification of an Office 365 Group. Hope it was beneficial for some.
#ThatLazyAdmin
It’s in reality a nice and helpful piece of info.
I am happy that you shared this useful information with
us. Please stay us informed like this. Thanks for sharing.
It is really nice…. Thanks a lot
thanks! A typo
The command text under To add Members to the Group the following cmdlet and be used.
is missing an S at the end, right? add-unifiedgrouplinkS
Apologies, I have updated the post. so sorry about that 🙂