Commands › Microsoft Teams

New-CsTeamsTemplatePermissionPolicy

Microsoft Teams MicrosoftTeams New-*

Creates a new instance of the TeamsTemplatePermissionPolicy.

Quick start script

# New-CsTeamsTemplatePermissionPolicy — 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-CsTeamsTemplatePermissionPolicy
$before | Format-List

# 3. Make the change (dry run first)
New-CsTeamsTemplatePermissionPolicy -Identity <String> -WhatIf
New-CsTeamsTemplatePermissionPolicy -Identity <String>

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

Syntax

New-CsTeamsTemplatePermissionPolicy
 [-HiddenTemplates <System.Management.Automation.PSListModifier`1[Microsoft.Teams.Policy.Administration.Cmdlets.Core.HiddenTemplate]>]
 [-Description <String>] [-Identity] <String> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String Description of the new policy instance to be created.
-Force SwitchParameter The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.
-HiddenTemplates HiddenTemplate] The list of Teams template IDs to hide. The HiddenTemplate objects are created with [New-CsTeamsHiddenTemplate](https://learn.microsoft.com/powershell/module/microsoftteams/new-csteamshiddentemplate).
-Identity String yes Name of the new policy instance to be created.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

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