"Activate" function with new-mgteam
Philipp Flury
10
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.
Old Command:
New-Team -DisplayName $Team -Description $Beschreibung -template EDU_Class -mailnickname $Mail -Owner $Admin
New Command:
$params = @{
"******@odata.bind" = "https://graph.microsoft.com/v1.0/teamsTemplates('educationClass')"
displayName = $Team
description = $Beschreibung
mailnickname = $Mail
members = @(
@{
"@odata.type" = "#microsoft.graph.aadUserConversationMember"
roles = @(
"owner"
)
"******@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.
10,894 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,685 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.
4,034 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,969 questions
Sign in to answer