Commands › Microsoft Teams

New-Team

Microsoft Teams MicrosoftTeams New-*

This cmdlet lets you provision a new Team for use in Microsoft Teams and will create an O365 Unified Group to back the team.

Quick start script

# New-Team — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-Team
$before | Format-List

# 3. Make the change
New-Team -DisplayName <String> -GroupId <String>

# 4. Verify and diff
$after = Get-Team
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

CreateTeam (Default)

New-Team -DisplayName <String> [-Description <String>] [-MailNickName <String>] [-Classification <String>]
 [-Visibility <String>] [-Template <String>] [-Owner <String>] [-AllowGiphy <Boolean>]
 [-GiphyContentRating <String>] [-AllowStickersAndMemes <Boolean>] [-AllowCustomMemes <Boolean>]
 [-AllowGuestCreateUpdateChannels <Boolean>] [-AllowGuestDeleteChannels <Boolean>]
 [-AllowCreateUpdateChannels <Boolean>] [-AllowDeleteChannels <Boolean>] [-AllowAddRemoveApps <Boolean>]
 [-AllowCreateUpdateRemoveTabs <Boolean>] [-AllowCreateUpdateRemoveConnectors <Boolean>]
 [-AllowUserEditMessages <Boolean>] [-AllowUserDeleteMessages <Boolean>] [-AllowOwnerDeleteMessages <Boolean>]
 [-AllowTeamMentions <Boolean>] [-AllowChannelMentions <Boolean>] [-ShowInTeamsSearchAndSuggestions <Boolean>]
 [-RetainCreatedGroup <SwitchParameter>] [-AllowCreatePrivateChannels <Boolean>] [<CommonParameters>]

MigrateGroup

New-Team -GroupId <String> [-Owner <String>] [-AllowGiphy <Boolean>] [-GiphyContentRating <String>]
 [-AllowStickersAndMemes <Boolean>] [-AllowCustomMemes <Boolean>] [-AllowGuestCreateUpdateChannels <Boolean>]
 [-AllowGuestDeleteChannels <Boolean>] [-AllowCreateUpdateChannels <Boolean>] [-AllowDeleteChannels <Boolean>]
 [-AllowAddRemoveApps <Boolean>] [-AllowCreateUpdateRemoveTabs <Boolean>]
 [-AllowCreateUpdateRemoveConnectors <Boolean>] [-AllowUserEditMessages <Boolean>]
 [-AllowUserDeleteMessages <Boolean>] [-AllowOwnerDeleteMessages <Boolean>] [-AllowTeamMentions <Boolean>]
 [-AllowChannelMentions <Boolean>][-ShowInTeamsSearchAndSuggestions <Boolean>] [-RetainCreatedGroup <SwitchParameter>] [<CommonParameters>]

Parameters (27)

ParameterTypeRequiredWhat it controls
-AllowAddRemoveApps Boolean Boolean value that determines whether or not members (not only owners) are allowed to add apps to the team.
-AllowChannelMentions Boolean Boolean value that determines whether or not channels in the team can be @ mentioned so that all users who follow the channel are notified.
-AllowCreatePrivateChannels Boolean Determines whether private channel creation is allowed for the team.
-AllowCreateUpdateChannels Boolean Setting that determines whether or not members (and not just owners) are allowed to create channels.
-AllowCreateUpdateRemoveConnectors Boolean Setting that determines whether or not members (and not only owners) can manage connectors in the team.
-AllowCreateUpdateRemoveTabs Boolean Setting that determines whether or not members (and not only owners) can manage tabs in channels.
-AllowCustomMemes Boolean Setting that determines whether or not members can use the custom memes functionality in teams.
-AllowDeleteChannels Boolean Setting that determines whether or not members (and not only owners) can delete channels in the team.
-AllowGiphy Boolean Setting that determines whether or not giphy can be used in the team.
-AllowGuestCreateUpdateChannels Boolean Setting that determines whether or not guests can create channels in the team.
-AllowGuestDeleteChannels Boolean Setting that determines whether or not guests can delete in the team.
-AllowOwnerDeleteMessages Boolean Setting that determines whether or not owners can delete messages that they or other members of the team have posted.
-AllowStickersAndMemes Boolean Setting that determines whether stickers and memes usage is allowed in the team.
-AllowTeamMentions Boolean Setting that determines whether the entire team can be @ mentioned (which means that all users will be notified)
-AllowUserDeleteMessages Boolean Setting that determines whether or not members can delete messages that they have posted.
-AllowUserEditMessages Boolean Setting that determines whether or not users can edit messages that they have posted.
-Classification String This parameter is reserved for internal Microsoft use.
-Description String Team description. Characters Limit - 1024.
-DisplayName String yes Team display name. Characters Limit - 256.
-GiphyContentRating String Setting that determines the level of sensitivity of giphy usage that is allowed in the team. Accepted values are "Strict" or "Moderate"
-GroupId String yes Specify a GroupId to convert to a Team. If specified, you cannot provide the other values that are already specified by the existing group, namely: Visibility, Alias, Description, or DisplayName. If, for example, you...
-MailNickName String The MailNickName parameter specifies the alias for the associated Office 365 Group. This value will be used for the mail enabled object and will be used as PrimarySmtpAddress for this Office 365 Group. The value of...
-Owner String An admin who is allowed to create on behalf of another user should use this flag to specify the desired owner of the group. This user will be added as both a member and an owner of the group. If not specified, the...
-RetainCreatedGroup SwitchParameter Switch Parameter allowing toggle of group cleanup if team creation fails. The default value of this parameter is $false to retain with current functionality where the unified group is deleted if the step of adding a...
-ShowInTeamsSearchAndSuggestions Boolean Setting that determines whether or not private teams should be searchable from Teams clients for users who do not belong to that team. Set to $false to make those teams not discoverable from Teams clients.
-Template String If you have an EDU license, you can use this parameter to specify which template you'd like to use for creating your group. Do not use this parameter when converting an existing group.
-Visibility String Set to Public to allow all users in your organization to join the group by default. Set to Private to require that an owner approve the join request.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.