Jump to content

Recommended Posts

Posted

Morning,

 

I've tried searching and going round in circles.. We have all our Teams populate automatically from SIMS via RM Unify. However, the school now needs to flatten the timetable and create custom lessons. Basically combining multiple classes into 1 so the teacher can teach 90 kids in one go. These can't go into SIMS (so I've been told) so need to do this via powershell.

 

So, they've given me all the students and the new classes. I can use this to create groups & populate in 0365 easily enough. But converting into a Team with Class template so they get assignments etc is confusing me. Does the powershell to create a Team from existing o365 group exist? I can load the client and create a class manually that way but with 30+ of these classes I'd rather script... I'm sure the answer is out there, I'm probably just asking the wrong way!

Appreciate any help! thanks in advance

Posted

If you have the latest version of the Teams powershell (such as 1.0.24 from the poshtestgallery.com) you can create class teams entirely from PowerShell

 

$group = new-team -displayname IT/A3 -Description "Test Team" -Template EDU_Class

 

You can then use the value returned to $group to add owners and members

 

Add-TeamUser -GroupId $group.GroupId -User "Student@YourDomain" -Role Member

Add-TeamUser -GroupId $group.GroupId -User "Staff@YourDomain" -Role Owner

  • Thanks 1
Posted

You sir @Boredguy are a life saver! Huge thanks for that. Can I send you biscuits/a beer!

 

I don't think I have been searching the right things then, plus didn't have the right version, which I though I had doh!

Followed: https://docs.microsoft.com/en-us/MicrosoftTeams/install-prerelease-teams-powershell-module to get the 1.0.24 and huzzah away I go. Can excel this bad boy now and get ticked off the list.

 

Cheers again

Posted

It does help that for the last few months the Edugeek Discord has had a few of us playing with the Teams powershell scripts, so it's a group effort as without input from the likes of @DrCheese and @Katy we might still be scratching our heads :D

 

I set all 500 of our groups at the start of April before knowing I could use the -template feature, so have to redo them all in the summer :D

  • Thanks 1
Posted

If you want to be really mean and secure down most of the options for the team as well..

 

$group = New-Team -DisplayName "IT/A1" -Description "Class Team" -Template EDU_Class -AllowGiphy $false -GiphyContentRating Strict -AllowStickersAndMemes $false -AllowCustomMemes $false -AllowGuestCreateUpdateChannels $false -AllowGuestDeleteChannels $false -AllowCreateUpdateChannels $false -AllowDeleteChannels $false -AllowAddRemoveApps $false -AllowCreateUpdateRemoveTabs $false -AllowCreateUpdateRemoveConnectors $false -AllowUserEditMessages $false -AllowUserDeleteMessages $false -AllowOwnerDeleteMessages $true -AllowTeamMentions $false -AllowChannelMentions $false

  • Thanks 2
Posted
If you want to be really mean and secure down most of the options for the team as well..

 

$group = New-Team -DisplayName "IT/A1" -Description "Class Team" -Template EDU_Class -AllowGiphy $false -GiphyContentRating Strict -AllowStickersAndMemes $false -AllowCustomMemes $false -AllowGuestCreateUpdateChannels $false -AllowGuestDeleteChannels $false -AllowCreateUpdateChannels $false -AllowDeleteChannels $false -AllowAddRemoveApps $false -AllowCreateUpdateRemoveTabs $false -AllowCreateUpdateRemoveConnectors $false -AllowUserEditMessages $false -AllowUserDeleteMessages $false -AllowOwnerDeleteMessages $true -AllowTeamMentions $false -AllowChannelMentions $false

 

Ahh cunning! Thank you... bonus biscuits!!

  • 1 year later...
Posted
If you want to be really mean and secure down most of the options for the team as well..

 

$group = New-Team -DisplayName "IT/A1" -Description "Class Team" -Template EDU_Class -AllowGiphy $false -GiphyContentRating Strict -AllowStickersAndMemes $false -AllowCustomMemes $false -AllowGuestCreateUpdateChannels $false -AllowGuestDeleteChannels $false -AllowCreateUpdateChannels $false -AllowDeleteChannels $false -AllowAddRemoveApps $false -AllowCreateUpdateRemoveTabs $false -AllowCreateUpdateRemoveConnectors $false -AllowUserEditMessages $false -AllowUserDeleteMessages $false -AllowOwnerDeleteMessages $true -AllowTeamMentions $false -AllowChannelMentions $false

 

Does this still allow team owners to create/delete channels or does it block it for Owners and Members?

 

Thanks,

Posted

That command just creates the team with the account used as the owner.

We then add the Teachers as Owners to the team using the following

Add-TeamUser -group $group.groupid -User [email protected] -Role Owner

Then they can add any additional channels they want to the same as any other team... only difference is I can bulk create hundreds of teams at the start of the year in a fraction of the time of using the GUI

  • Thanks 1
Posted

That's great thanks.

 

I also added in -MailNickname value so it didn't have the default random string

 

Once this has been run and student added the team owner is told that there are students waiting to join and has to Activate them. Any way to bypass/automate that?

 

Thanks,

Posted

also no way to bypass that, but also means that if you've got it all setup and the members/owners added, the kids will not see it in their list until the teacher actually clicks to activate the group, so also cuts down on the spam messages they could post in there.

 

Obviously if you were not using a class template it wouldn't give the prompt, but then you also wouldn't get the read only resource folder created, assignments available etc

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...