question

MarianHercek-3024 avatar image
0 Votes"
MarianHercek-3024 asked NK-8552 answered

Create team using Powershell

Cannot find a way to create a team:

  • from a group (-GroupId parameter)

  • using a template (-Template parameter)

  • setting visibility (-Visibility parameter)

This combination parameters are not supported for New-Team cmdlet (even in 1.1.6 Microsoft Teams Powershell module).

Why?
All those settings are supported via GUI (i.e. Microsoft Teams client for Windows, version 1.3)




office-teams-windows-itpro
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeonLaude avatar image
0 Votes"
LeonLaude answered MarianHercek-3024 commented

Hi @MarianHercek-3024,

Here's an example on how to create a new team from a GroupId:

 Install-Module MicrosoftTeams -Force
 Connect-MicrosoftTeams
 $SiteObj = Get-SPOSite -Identity $SiteURL.SiteURL
 New-Team -GroupId $SiteObj.GroupId.Guid

Regarding the -Template parameter, read the following:

IMPORTANT: Using this cmdlet to create a new team using a template is still in preview. You can install and use the preview module from the PowerShell test gallery. For instructions on installing and using the Teams PowerShell preview module, see Install the pre-release version of the Teams PowerShell module.

Reference:
https://docs.microsoft.com/en-us/powershell/module/teams/New-Team?view=teams-ps


Here's an example on how to use the -Visibility parameter:

 New-Team -DisplayName "Dev Team" -Description "Team for Development" -Visibility Public

or

 $Team = New-Team -DisplayName "Dev Team"
 Set-Team -GroupId $Team.GroupId -Visibility Private


(If the reply was helpful please don't forget to upvote or accept as answer, thank you)


Best regards,
Leon

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks.
So it seems only way is to use 3 commands.

Where do I find values for -Template parameter?

0 Votes 0 ·

The -Template parameter is used to set the type of Education Team (Class, PLC etc) in the New-Team cmdlet, which still remains in preview:
Here are some valid values:

30201-template-parameter.png




0 Votes 0 ·
SharonZhao-MSFT avatar image
0 Votes"
SharonZhao-MSFT answered

@MarianHercek-3024,

You can create a team from existing Office 365 group by the id of the group:

 New-Team -GroupId "Existing Group ID - GUID"

In this scenario, you cannot provide the group related values that are already specified in the existing group, such as Visibility, Alias, Description, or DisplayName.

As Leon Laude said, the Template parameter is used to set the type of Education Team in the New-Team cmdlet.


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MarianHercek-3024 avatar image
0 Votes"
MarianHercek-3024 answered DangTruong-6004 published

What kind/template of Team is created by default (in EDU tenant). How do I find it out?
I can see four kinds/templates: Class, PLC, Staff, Other.

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EDU_Class or EDU_PLC

0 Votes 0 ·

What exactly is it?

0 Votes 0 ·

@MarianHercek-3024,
EDU_Class is Class. EDU_PLC is PLC.
The four type of teams are for different purpose. The following image explains it.
30941-image.png


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·
image.png (21.2 KiB)
Show more comments
NK-8552 avatar image
0 Votes"
NK-8552 answered

It seems like there are only 2 parameters available in Teams cmdlet under -template switch. Is it powerShell limitation or tenant limitation? I'm sure in GUI we should be able to create all 4 types as shown in image shared above by @SharonZhao-MSFT. This is what I get in PowerShell ISE when I checked for template parameters:

83353-image.png



image.png (47.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.