|

Creating Office 365 Groups with PowerShell

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.

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.

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.

Add-UnifiedGroupLinks –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-UnifiedGroupLinks –Identity GlobalExSupport –LinkType Owner –Link Farren@ThatLazyAdmin.com

To list the Group Members the following cmdlet can be used.

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 –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

Similar Posts

4 Comments

  1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *