New-CsTeamTemplate

This cmdlet lets you provision a new team template for use in Microsoft Teams. Learn more about team templates here.

Syntax

New-CsTeamTemplate
   -Locale <String>
   -DisplayName <String>
   -ShortDescription <String>
   [-App <ITeamsAppTemplate[]>]
   [-Category <String[]>]
   [-Channel <IChannelTemplate[]>]
   [-Classification <String>]
   [-Description <String>]
   [-DiscoverySetting <ITeamDiscoverySettings>]
   [-FunSetting <ITeamFunSettings>]
   [-GuestSetting <ITeamGuestSettings>]
   [-Icon <String>]
   [-IsMembershipLimitedToOwner]
   [-MemberSetting <ITeamMemberSettings>]
   [-MessagingSetting <ITeamMessagingSettings>]
   [-OwnerUserObjectId <String>]
   [-PublishedBy <String>]
   [-Specialization <String>]
   [-TemplateId <String>]
   [-Uri <String>]
   [-Visibility <String>]
   [-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <Uri>]
   [-ProxyCredential <PSCredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CsTeamTemplate
   -Locale <String>
   -Body <ITeamTemplate>
   [-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <Uri>]
   [-ProxyCredential <PSCredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CsTeamTemplate
   -InputObject <IConfigApiBasedCmdletsIdentity>
   -Body <ITeamTemplate>
   [-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <Uri>]
   [-ProxyCredential <PSCredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-CsTeamTemplate
   -InputObject <IConfigApiBasedCmdletsIdentity>
   -DisplayName <String>
   -ShortDescription <String>
   [-App <ITeamsAppTemplate[]>]
   [-Category <String[]>]
   [-Channel <IChannelTemplate[]>]
   [-Classification <String>]
   [-Description <String>]
   [-DiscoverySetting <ITeamDiscoverySettings>]
   [-FunSetting <ITeamFunSettings>]
   [-GuestSetting <ITeamGuestSettings>]
   [-Icon <String>]
   [-IsMembershipLimitedToOwner]
   [-MemberSetting <ITeamMemberSettings>]
   [-MessagingSetting <ITeamMessagingSettings>]
   [-OwnerUserObjectId <String>]
   [-PublishedBy <String>]
   [-Specialization <String>]
   [-TemplateId <String>]
   [-Uri <String>]
   [-Visibility <String>]
   [-Break]
   [-HttpPipelineAppend <SendAsyncStep[]>]
   [-HttpPipelinePrepend <SendAsyncStep[]>]
   [-Proxy <Uri>]
   [-ProxyCredential <PSCredential>]
   [-ProxyUseDefaultCredentials]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Examples

EXAMPLE 1

PS C:> (Get-CsTeamTemplate -OdataId '/api/teamtemplates/v1.0/com.microsoft.teams.template.AdoptOffice365/Public/en-US') > input.json
# open json in your favorite editor, make changes

PS C:> New-CsTeamTemplate -Locale en-US -Body (Get-Content '.input.json' | Out-String)

Step 1: Create new template from copy of existing template. Gets the template JSON file of Template with specified OData ID, creates a JSON file user can make edits in. Step 2: Create a new template from the JSON file named “input”.

EXAMPLE 2

PS C:> $template = Get-CsTeamTemplate -OdataId '/api/teamtemplates/v1.0/com.microsoft.teams.template.AdoptOffice365/Public/en-US'
PS C:> $template | Format-List # show the output object as it would be accessed

PS C:> $template.Category = $null # unset category to copy from public template
PS C:> $template.DisplayName = 'New Template from object'
PS C:> $template.Channel[1].DisplayName += ' modified'
## add a new channel to the channel list
PS C:> $template.Channel += `
@{ `
  displayName="test"; `
  id="b82b7d0a-6bc9-4fd8-bf09-d432e4ea0475"; `
  isFavoriteByDefault=$false; `
}

PS C:> New-CsTeamTemplate -Locale en-US -Body $template

Create a template using a complex object syntax.

EXAMPLE 3

PS C:> $template = New-Object Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.TeamTemplate -Property @{`
DisplayName='New Template';`
ShortDescription='Short Definition';`
Description='New Description';`
App=@{id='feda49f8-b9f2-4985-90f0-dd88a8f80ee1'}, @{id='1d71218a-92ad-4254-be15-c5ab7a3e4423'};`
Channel=@{`
  displayName = "General";`
  id= "General";`
  isFavoriteByDefault= $true`
  },`
  @{`
    displayName= "test";`
    id= "b82b7d0a-6bc9-4fd8-bf09-d432e4ea0475";`
    isFavoriteByDefault= $false`
  }`
}

PS C:> New-CsTeamTemplate -Locale en-US -Body $template

Create template from scratch

Parameters

-App

Gets or sets the set of applications that should be installed in teams created based on the template.The app catalog is the main directory for information about each app; this set is intended only as a reference. To construct, see NOTES section for APP properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamsAppTemplate[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Body

The client input for a request to create a template. Only admins from Config Api can perform this request. To construct, see NOTES section for BODY properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamTemplate
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Break

Wait for .NET debugger to attach

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Category

Gets or sets list of categories.

Type:System.String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Channel

Gets or sets the set of channel templates included in the team template. To construct, see NOTES section for CHANNEL properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.IChannelTemplate[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Classification

Gets or sets the team's classification.Tenant admins configure AAD with the set of possible values.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Gets or sets the team's Description.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DiscoverySetting

Governs discoverability of a team. To construct, see NOTES section for DISCOVERYSETTING properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamDiscoverySettings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

Gets or sets the team's DisplayName.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FunSetting

Governs use of fun media like giphy and stickers in the team. To construct, see NOTES section for FUNSETTING properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamFunSettings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GuestSetting

Guest role settings for the team. To construct, see NOTES section for GUESTSETTING properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamGuestSettings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HttpPipelineAppend

SendAsync Pipeline Steps to be appended to the front of the pipeline

Type:SendAsyncStep[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HttpPipelinePrepend

SendAsync Pipeline Steps to be prepended to the front of the pipeline

Type:SendAsyncStep[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Icon

Gets or sets template icon.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.IConfigApiBasedCmdletsIdentity
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-IsMembershipLimitedToOwner

Gets or sets whether to limit the membership of the team to owners in the AAD group until an owner "activates" the team.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Locale
Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MemberSetting

Member role settings for the team. To construct, see NOTES section for MEMBERSETTING properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamMemberSettings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MessagingSetting

Governs use of messaging features within the teamThese are settings the team owner should be able to modify from UI after team creation. To construct, see NOTES section for MESSAGINGSETTING properties and create a hash table.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamMessagingSettings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OwnerUserObjectId

Gets or sets the AAD user object id of the user who should be set as the owner of the new team.Only to be used when an application or administrative user is making the request on behalf of the specified user.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Proxy

The URI for the proxy server to use

Type:Uri
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProxyCredential

Credentials for a proxy server to use for the remote call

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProxyUseDefaultCredentials

Use the default credentials for the proxy

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-PublishedBy

Gets or sets published name.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ShortDescription

Gets or sets template short description.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Specialization

The specialization or use case describing the team.Used for telemetry/BI, part of the team context exposed to app developers, and for legacy implementations of differentiated features for education.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TemplateId

Gets or sets the id of the base template for the team.Either a Microsoft base template or a custom template.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Uri

Gets or sets uri to be used for GetTemplate api call.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Visibility

Used to control the scope of users who can view a group/team and its members, and ability to join.

Type:System.String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.IConfigApiBasedCmdletsIdentity

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamTemplate

Outputs

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ICreateTemplateResponse

Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ITeamTemplateErrorResponse

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

APP <ITeamsAppTemplate[]>: Gets or sets the set of applications that should be installed in teams created based on the template.The app catalog is the main directory for information about each app; this set is intended only as a reference.

  • [Id <String>]: Gets or sets the app's ID in the global apps catalog.

BODY : The client input for a request to create a template. Only admins from Config Api can perform this request.

  • DisplayName <String>: Gets or sets the team's DisplayName.
  • ShortDescription <String>: Gets or sets template short description.
  • [App <ITeamsAppTemplate[]>]: Gets or sets the set of applications that should be installed in teams created based on the template. The app catalog is the main directory for information about each app; this set is intended only as a reference.
    • [Id <String>]: Gets or sets the app's ID in the global apps catalog.
  • [Category <String[]>]: Gets or sets list of categories.
  • [Channel <IChannelTemplate[]>]: Gets or sets the set of channel templates included in the team template.
    • [Description <String>]: Gets or sets channel description as displayed to users.
    • [DisplayName <String>]: Gets or sets channel name as displayed to users.
    • [Id <String>]: Gets or sets identifier for the channel template.
    • [IsFavoriteByDefault <Boolean?>]: Gets or sets a value indicating whether whether new members of the team should automatically favorite the channel, pinning it for visibility in the UI and using resources to make switching to the channel faster.
    • [Tab <IChannelTabTemplate[]>]: Gets or sets collection of tabs that should be added to the channel.
      • [Configuration <ITeamsTabConfiguration>]: Represents the configuration of a tab.
        • [ContentUrl <String>]: Gets or sets the Url used for rendering tab contents in Teams.
        • [EntityId <String>]: Gets or sets the identifier for the entity hosted by the tab provider.
        • [RemoveUrl <String>]: Gets or sets the Url that is invoked when the user tries to remove a tab from the FE client.
        • [WebsiteUrl <String>]: Gets or sets the Url for showing tab contents outside of Teams.
      • [Id <String>]: Gets or sets identifier for the channel tab template.
      • [Key <String>]: Gets a unique identifier.
      • [MessageId <String>]: Gets or sets id used to identify the chat message associated with the tab.
      • [Name <String>]: Gets or sets the tab name displayed to users.
      • [SortOrderIndex <String>]: Gets or sets index of the order used for sorting tabs.
      • [TeamsAppId <String>]: Gets or sets the app's id in the global apps catalog.
      • [WebUrl <String>]: Gets or sets the deep link url of the tab instance.
  • [Classification <String>]: Gets or sets the team's classification. Tenant admins configure AAD with the set of possible values.
  • [Description <String>]: Gets or sets the team's Description.
  • [DiscoverySetting <ITeamDiscoverySettings>]: Governs discoverability of a team.
    • ShowInTeamsSearchAndSuggestion <Boolean>: Gets or sets value indicating if team is visible within search and suggestions in Teams clients.
  • [FunSetting <ITeamFunSettings>]: Governs use of fun media like giphy and stickers in the team.
    • AllowCustomMeme <Boolean>: Gets or sets a value indicating whether users are allowed to create and post custom meme images in team conversations.
    • AllowGiphy <Boolean>: Gets or sets a value indicating whether users can post giphy content in team conversations.
    • AllowStickersAndMeme <Boolean>: Gets or sets a value indicating whether users can post stickers and memes in team conversations.
    • GiphyContentRating <String>: Gets or sets the rating filter on giphy content.
  • [GuestSetting <ITeamGuestSettings>]: Guest role settings for the team.
    • AllowCreateUpdateChannel <Boolean>: Gets or sets a value indicating whether guests can create or edit channels in the team.
    • AllowDeleteChannel <Boolean>: Gets or sets a value indicating whether guests can delete team channels.
  • [Icon <String>]: Gets or sets template icon.
  • [IsMembershipLimitedToOwner <Boolean?>]: Gets or sets whether to limit the membership of the team to owners in the AAD group until an owner "activates" the team.
  • [MemberSetting <ITeamMemberSettings>]: Member role settings for the team.
    • AllowAddRemoveApp <Boolean>: Gets or sets a value indicating whether members can add or remove apps in the team.
    • AllowCreatePrivateChannel <Boolean>: Gets or Sets a value indicating whether members can create Private channels.
    • AllowCreateUpdateChannel <Boolean>: Gets or sets a value indicating whether members can create or edit channels in the team.
    • AllowCreateUpdateRemoveConnector <Boolean>: Gets or sets a value indicating whether members can add, edit, or remove connectors in the team.
    • AllowCreateUpdateRemoveTab <Boolean>: Gets or sets a value indicating whether members can add, edit or remove pinned tabs in the team.
    • AllowDeleteChannel <Boolean>: Gets or sets a value indicating whether members can delete team channels.
    • UploadCustomApp <Boolean>: Gets or sets a value indicating is allowed to upload custom apps.
  • [MessagingSetting <ITeamMessagingSettings>]: Governs use of messaging features within the team These are settings the team owner should be able to modify from UI after team creation.
    • AllowChannelMention <Boolean>: Gets or sets a value indicating whether team members can at-mention entire channels in team conversations.
    • AllowOwnerDeleteMessage <Boolean>: Gets or sets a value indicating whether team owners can delete anyone's messages in team conversations.
    • AllowTeamMention <Boolean>: Gets or sets a value indicating whether team members can at-mention the entire team in team conversations.
    • AllowUserDeleteMessage <Boolean>: Gets or sets a value indicating whether team members can delete their own messages in team conversations.
    • AllowUserEditMessage <Boolean>: Gets or sets a value indicating whether team members can edit their own messages in team conversations.
  • [OwnerUserObjectId <String>]: Gets or sets the AAD user object id of the user who should be set as the owner of the new team. Only to be used when an application or administrative user is making the request on behalf of the specified user.
  • [PublishedBy <String>]: Gets or sets published name.
  • [Specialization <String>]: The specialization or use case describing the team. Used for telemetry/BI, part of the team context exposed to app developers, and for legacy implementations of differentiated features for education.
  • [TemplateId <String>]: Gets or sets the id of the base template for the team. Either a Microsoft base template or a custom template.
  • [Uri <String>]: Gets or sets uri to be used for GetTemplate api call.
  • [Visibility <String>]: Used to control the scope of users who can view a group/team and its members, and ability to join.

CHANNEL <IChannelTemplate[]>: Gets or sets the set of channel templates included in the team template.

  • [Description <String>]: Gets or sets channel description as displayed to users.
  • [DisplayName <String>]: Gets or sets channel name as displayed to users.
  • [Id <String>]: Gets or sets identifier for the channel template.
  • [IsFavoriteByDefault <Boolean?>]: Gets or sets a value indicating whether whether new members of the team should automatically favorite the channel, pinning it for visibility in the UI and using resources to make switching to the channel faster.
  • [Tab <IChannelTabTemplate[]>]: Gets or sets collection of tabs that should be added to the channel.
    • [Configuration <ITeamsTabConfiguration>]: Represents the configuration of a tab.
      • [ContentUrl <String>]: Gets or sets the Url used for rendering tab contents in Teams.
      • [EntityId <String>]: Gets or sets the identifier for the entity hosted by the tab provider.
      • [RemoveUrl <String>]: Gets or sets the Url that is invoked when the user tries to remove a tab from the FE client.
      • [WebsiteUrl <String>]: Gets or sets the Url for showing tab contents outside of Teams.
    • [Id <String>]: Gets or sets identifier for the channel tab template.
    • [Key <String>]: Gets a unique identifier.
    • [MessageId <String>]: Gets or sets id used to identify the chat message associated with the tab.
    • [Name <String>]: Gets or sets the tab name displayed to users.
    • [SortOrderIndex <String>]: Gets or sets index of the order used for sorting tabs.
    • [TeamsAppId <String>]: Gets or sets the app's id in the global apps catalog.
    • [WebUrl <String>]: Gets or sets the deep link url of the tab instance.

DISCOVERYSETTING : Governs discoverability of a team.

  • ShowInTeamsSearchAndSuggestion <Boolean>: Gets or sets value indicating if team is visible within search and suggestions in Teams clients.

FUNSETTING : Governs use of fun media like giphy and stickers in the team.

  • AllowCustomMeme <Boolean>: Gets or sets a value indicating whether users are allowed to create and post custom meme images in team conversations.
  • AllowGiphy <Boolean>: Gets or sets a value indicating whether users can post giphy content in team conversations.
  • AllowStickersAndMeme <Boolean>: Gets or sets a value indicating whether users can post stickers and memes in team conversations.
  • GiphyContentRating <String>: Gets or sets the rating filter on giphy content.

GUESTSETTING : Guest role settings for the team.

  • AllowCreateUpdateChannel <Boolean>: Gets or sets a value indicating whether guests can create or edit channels in the team.
  • AllowDeleteChannel <Boolean>: Gets or sets a value indicating whether guests can delete team channels.

INPUTOBJECT : Identity Parameter

  • [Bssid <String>]:
  • [ChassisId <String>]:
  • [CivicAddressId <String>]: Civic address id.
  • [Country <String>]:
  • [GroupId <String>]: The ID of a group whose policy assignments will be returned.
  • [Id <String>]:
  • [Identity <String>]:
  • [Locale <String>]:
  • [LocationId <String>]: Location id.
  • [OdataId <String>]: A composite URI of a template.
  • [OperationId <String>]: The ID of a batch policy assignment operation.
  • [OrderId <String>]:
  • [PackageName <String>]: The name of a specific policy package
  • [PolicyType <String>]: The policy type for which group policy assignments will be returned.
  • [Port <String>]:
  • [PortInOrderId <String>]:
  • [PublicTemplateLocale <String>]: Language and country code for localization of publicly available templates.
  • [SubnetId <String>]:
  • [TenantId <String>]:
  • [UserId <String>]: UserId. Supports Guid. Eventually UPN and SIP.

MEMBERSETTING : Member role settings for the team.

  • AllowAddRemoveApp <Boolean>: Gets or sets a value indicating whether members can add or remove apps in the team.
  • AllowCreatePrivateChannel <Boolean>: Gets or Sets a value indicating whether members can create Private channels.
  • AllowCreateUpdateChannel <Boolean>: Gets or sets a value indicating whether members can create or edit channels in the team.
  • AllowCreateUpdateRemoveConnector <Boolean>: Gets or sets a value indicating whether members can add, edit, or remove connectors in the team.
  • AllowCreateUpdateRemoveTab <Boolean>: Gets or sets a value indicating whether members can add, edit or remove pinned tabs in the team.
  • AllowDeleteChannel <Boolean>: Gets or sets a value indicating whether members can delete team channels.
  • UploadCustomApp <Boolean>: Gets or sets a value indicating is allowed to upload custom apps.

MESSAGINGSETTING : Governs use of messaging features within the teamThese are settings the team owner should be able to modify from UI after team creation.

  • AllowChannelMention <Boolean>: Gets or sets a value indicating whether team members can at-mention entire channels in team conversations.
  • AllowOwnerDeleteMessage <Boolean>: Gets or sets a value indicating whether team owners can delete anyone's messages in team conversations.
  • AllowTeamMention <Boolean>: Gets or sets a value indicating whether team members can at-mention the entire team in team conversations.
  • AllowUserDeleteMessage <Boolean>: Gets or sets a value indicating whether team members can delete their own messages in team conversations.
  • AllowUserEditMessage <Boolean>: Gets or sets a value indicating whether team members can edit their own messages in team conversations.