"Activate" function with new-mgteam

Philipp Flury 0 Reputation points

We create teams for our school using Powershell. We used to use the Powershell command new-team for this. Now we use the Graph module with new-mgteam.

Since we created the teams with new-mgteam, the teams no longer need to be activated by an owner, but are activated immediately. See screenshot.

User's image

Old Command:

New-Team -DisplayName $Team -Description $Beschreibung -template EDU_Class -mailnickname $Mail -Owner $Admin

New Command:

$params = @{
                "template@odata.bind" = "https://graph.microsoft.com/v1.0/teamsTemplates('educationClass')"
                displayName = $Team
                description = $Beschreibung
                mailnickname = $Mail
                members = @(
                    "@odata.type" = "#microsoft.graph.aadUserConversationMember"
			         roles = @(
			         "user@odata.bind" = "https://graph.microsoft.com/v1.0/users('$adminID')"
            New-MgTeam -BodyParameter $params

How can we reactivate this function? Because we want our teams to be prepared before Members can use it.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
8,131 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,128 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,538 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,556 questions
{count} votes