One of the much appreciated features in Office 365 are the new Office 365 Groups.
Group introduction
An Office 365 group provides a way to collaborate on a project with co-workers. When created, the Office 365 system creates a shared mailbox, shared calendar, a Sharepoint teamsite and a OneNote notebook for the team to use. When allowed by their tenant administrator, users can create a new Office 365 group themselves, without the need to contact their IT department.
When looking at these functionalities for our internal network, we decided they might come in handy for certain projects. To keep things as standard as possible, we needed a way to automate the creation of these groups as much as possible. And when you talk automation, you talk Powershell.
Automating group creation
It turns out you can manage new Office 365 groups through Powershell without hassle. In Powershell, these groups are referred to as unified groups
. As you know, there are only three commands you know to learn Powershell: get-command
, get-help
and get-member
. Let’s use these commands to check out what we can do with these groups in Powershell.
Ofcourse, we need to log on to our O365 tenant with Powershell first. After that, we’ll need to find out which commands are available.
|
|
As you can see, there are multiple cmdlets to add, remove and manage new Office 365 groups. I would like to start out with creating a new group, so I’ll need some info on that.
|
|
To get some pointers on the use of this cmdlet, we can ask for some examples.
|
|
So, let’s create a new group! Because I don’t want my colleagues to be able to see this group, I’ll set the accesstype to private.
|
|
Office 365 will no create the new group. It takes some time to complete the command, because the system will provision all parts of the group: a shared mailbox, shared calendar, OneNote notebook,
When the group is live, we can see what is stored about the group.
|
|
After creating the group, we might want to add some members to it. The new-unifiedgrouplinks
is what does just that.
Ofcourse, you can use the get-unifiedgrouplinks
cmdlet to retrieve the members or owners of a group. A unifiedgrouplink can be of different types: owner
, member
or subscriber
.
|
|
|
|
By using this cmdlets, you could automate the creation, management and deletion of Office 365 groups. That way, you can set up all the groups you deploy in exactly the same way and perform these tasks automatically on certain triggers!