Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-Team
- Module:
- MicrosoftTeams PowerShell module
Syntax
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>]
[-RetainCreatedGroup <SwitchParameter>]
[<CommonParameters>]
Description
Creates a new team with user specified settings, and returns a Group object with a GroupID property.
Groups created through teams cmdlets, APIs, or clients will not show up in Outlook by default.
If you want these groups to appear in Outlook clients, you can use the Set-UnifiedGroup cmdlet in the Exchange Powershell Module to disable the switch parameter HiddenFromExchangeClientsEnabled (-HiddenFromExchangeClientsEnabled:$false).
Note: The Teams application may need to be open by an Owner for up to two hours before changes are reflected.
Examples
Example 1
New-Team -DisplayName "Tech Reads"
This example creates a team with all parameters with their default values.
Example 2
New-Team -DisplayName "Tech Reads" -Description "Team to post technical articles and blogs" -Visibility Public
This example creates a team with a specific description and public visibility.
Example 3
$group = New-Team -MailNickname "TestTeam" -displayname "Test Teams" -Visibility "private"
Add-TeamUser -GroupId $group.GroupId -User "fred@example.com"
Add-TeamUser -GroupId $group.GroupId -User "john@example.com"
Add-TeamUser -GroupId $group.GroupId -User "wilma@example.com"
New-TeamChannel -GroupId $group.GroupId -DisplayName "Q4 planning"
New-TeamChannel -GroupId $group.GroupId -DisplayName "Exec status"
New-TeamChannel -GroupId $group.GroupId -DisplayName "Contracts"
This example creates a team, adds three members to it, and creates three channels within it.
Parameters
-AllowAddRemoveApps
Boolean value that determines whether or not members (not only owners) are allowed to add apps to the team.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowChannelMentions
Boolean value that determines whether or not channels in the team can be @ mentioned so that all users who follow the channel are notified.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowCreatePrivateChannels
Determines whether private channel creation is allowed for the team.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowCreateUpdateChannels
Setting that determines whether or not members (and not just owners) are allowed to create channels.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowCreateUpdateRemoveConnectors
Setting that determines whether or not members (and not only owners) can manage connectors in the team.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowCreateUpdateRemoveTabs
Setting that determines whether or not members (and not only owners) can manage tabs in channels.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowCustomMemes
Setting that determines whether or not members can use the custom memes functionality in teams.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowDeleteChannels
Setting that determines whether or not members (and not only owners) can delete channels in the team.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowGiphy
Setting that determines whether or not giphy can be used in the team.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowGuestCreateUpdateChannels
Setting that determines whether or not guests can create channels in the team.
Parameter properties
| Type: | Boolean |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowGuestDeleteChannels
Setting that determines whether or not guests can delete in the team.
Parameter properties
| Type: | Boolean |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowOwnerDeleteMessages
Setting that determines whether or not owners can delete messages that they or other members of the team have posted.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowStickersAndMemes
Setting that determines whether stickers and memes usage is allowed in the team.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowTeamMentions
Setting that determines whether the entire team can be @ mentioned (which means that all users will be notified)
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowUserDeleteMessages
Setting that determines whether or not members can delete messages that they have posted.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AllowUserEditMessages
Setting that determines whether or not users can edit messages that they have posted.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Classification
This parameter is reserved for internal Microsoft use.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Description
Team description. Characters Limit - 1024.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DisplayName
Team display name. Characters Limit - 256.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-GiphyContentRating
Setting that determines the level of sensitivity of giphy usage that is allowed in the team. Accepted values are "Strict" or "Moderate"
Parameter properties
| Type: | String |
| Default value: | Moderate |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-GroupId
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 need to create a Team from an existing Microsoft 365 Group, use the ExternalDirectoryObjectId property value returned by Get-UnifiedGroup.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-MailNickName
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 the MailNickName parameter has to be unique across your tenant. Note: If Microsoft 365 groups naming policies are enabled in your tenant, this parameter is required and must also comply with the naming policy.
For more details about the naming conventions see here: New-UnifiedGroup, Parameter: -Alias.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Owner
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 user who creates the team will be added as both a member and an owner. Please note: This parameter is mandatory, if connected using Certificate Based Authentication.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-RetainCreatedGroup
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 team to the group fails. Set it to $true to retain the unified group created even if team creation fails to allow self-retry of team creation or self-cleanup of group as appropriate.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ShowInTeamsSearchAndSuggestions
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.
Parameter properties
| Type: | Boolean |
| Default value: | True |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Template
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.
Valid values are: "EDU_Class" or "EDU_PLC"
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Visibility
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.
Parameter properties
| Type: | String |
| Default value: | Private |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
GroupId
Related Links
Feedback
Was this page helpful?
