|
| 1 | +--- |
| 2 | +external help file: Microsoft.Teams.Policy.Administration.Cmdlets.Core.dll-Help.xml |
| 3 | +Module Name: Microsoft.Teams.Policy.Administration.Cmdlets.Core |
| 4 | +online version: https://learn.microsoft.com/powershell/module/teams/new-csteamstemplatepermissionpolicy |
| 5 | +title: New-CsTeamsTemplatePermissionPolicy |
| 6 | +author: yishuaihuang4 |
| 7 | +ms.author: yishuaihuang |
| 8 | +ms.reviewer: |
| 9 | +manager: weiliu2 |
| 10 | +schema: 2.0.0 |
| 11 | +--- |
| 12 | + |
| 13 | +# New-CsTeamsTemplatePermissionPolicy |
| 14 | + |
| 15 | +## SYNOPSIS |
| 16 | +Creates a new instance of the TeamsTemplatePermissionPolicy. |
| 17 | + |
| 18 | +## SYNTAX |
| 19 | + |
| 20 | +``` |
| 21 | +New-CsTeamsTemplatePermissionPolicy |
| 22 | + [-HiddenTemplates <System.Management.Automation.PSListModifier`1[Microsoft.Teams.Policy.Administration.Cmdlets.Core.HiddenTemplate]>] |
| 23 | + [-Description <String>] [-Identity] <String> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] |
| 24 | +``` |
| 25 | + |
| 26 | +## DESCRIPTION |
| 27 | +Creates a new instance of the policy with a name and a list of hidden Teams template IDs. The template IDs passed into the `HiddenTemplates` object must be valid existing template IDs. The current custom and first-party templates on a tenant can be fetched by [Get-CsTeamTemplateList](Get-CsTeamTemplateList.md). |
| 28 | + |
| 29 | +## EXAMPLES |
| 30 | + |
| 31 | +### Example 1 |
| 32 | + |
| 33 | +Assuming there are two valid templates with IDs `com.microsoft.teams.template.ManageAProject` and `com.microsoft.teams.template.ManageAnEvent`, we will first create the `HiddenTemplate` objects. |
| 34 | + |
| 35 | +The next step would be to create the policy instance. |
| 36 | +```powershell |
| 37 | +PS >$manageEventTemplate = New-CsTeamsHiddenTemplate -Id com.microsoft.teams.template.ManageAnEvent |
| 38 | +PS >$manageProjectTemplate = New-CsTeamsHiddenTemplate -Id com.microsoft.teams.template.ManageAProject |
| 39 | +PS >$HiddenList = @($manageProjectTemplate, $manageEventTemplate) |
| 40 | +PS >New-CsTeamsTemplatePermissionPolicy -Identity Foobar -HiddenTemplates $HiddenList |
| 41 | +``` |
| 42 | + |
| 43 | +```output |
| 44 | +Identity HiddenTemplates Description |
| 45 | +-------- --------------- ----------- |
| 46 | +Tag:Foobar {com.microsoft.teams.template.ManageAProject, com.microsoft.teams.template.ManageAnEvent} |
| 47 | +``` |
| 48 | + |
| 49 | +## PARAMETERS |
| 50 | + |
| 51 | +### -Confirm |
| 52 | +Prompts you for confirmation before running the cmdlet. |
| 53 | + |
| 54 | +```yaml |
| 55 | +Type: SwitchParameter |
| 56 | +Parameter Sets: (All) |
| 57 | +Aliases: cf |
| 58 | + |
| 59 | +Required: False |
| 60 | +Position: Named |
| 61 | +Default value: None |
| 62 | +Accept pipeline input: False |
| 63 | +Accept wildcard characters: False |
| 64 | +``` |
| 65 | +
|
| 66 | +### -Description |
| 67 | +Description of the new policy instance to be created. |
| 68 | +
|
| 69 | +```yaml |
| 70 | +Type: String |
| 71 | +Parameter Sets: (All) |
| 72 | +Aliases: |
| 73 | + |
| 74 | +Required: False |
| 75 | +Position: Named |
| 76 | +Default value: None |
| 77 | +Accept pipeline input: False |
| 78 | +Accept wildcard characters: False |
| 79 | +``` |
| 80 | +
|
| 81 | +### -Force |
| 82 | +The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch. |
| 83 | +
|
| 84 | +You can use this switch to run tasks programmatically where prompting for administrative input is inappropriate. |
| 85 | +
|
| 86 | +```yaml |
| 87 | +Type: SwitchParameter |
| 88 | +Parameter Sets: (All) |
| 89 | +Aliases: |
| 90 | + |
| 91 | +Required: False |
| 92 | +Position: Named |
| 93 | +Default value: None |
| 94 | +Accept pipeline input: False |
| 95 | +Accept wildcard characters: False |
| 96 | +``` |
| 97 | +
|
| 98 | +### -HiddenTemplates |
| 99 | +The list of Teams template IDs to hide. |
| 100 | +The HiddenTemplate objects are created with [New-CsTeamsHiddenTemplate](New-CsTeamsHiddenTemplate.md). |
| 101 | +
|
| 102 | +```yaml |
| 103 | +Type: System.Management.Automation.PSListModifier`1[Microsoft.Teams.Policy.Administration.Cmdlets.Core.HiddenTemplate] |
| 104 | +Parameter Sets: (All) |
| 105 | +Aliases: |
| 106 | + |
| 107 | +Required: False |
| 108 | +Position: Named |
| 109 | +Default value: None |
| 110 | +Accept pipeline input: False |
| 111 | +Accept wildcard characters: False |
| 112 | +``` |
| 113 | +
|
| 114 | +### -Identity |
| 115 | +Name of the new policy instance to be created. |
| 116 | +
|
| 117 | +```yaml |
| 118 | +Type: String |
| 119 | +Parameter Sets: (All) |
| 120 | +Aliases: |
| 121 | + |
| 122 | +Required: True |
| 123 | +Position: 1 |
| 124 | +Default value: None |
| 125 | +Accept pipeline input: False |
| 126 | +Accept wildcard characters: False |
| 127 | +``` |
| 128 | +
|
| 129 | +### -WhatIf |
| 130 | +Shows what would happen if the cmdlet runs. |
| 131 | +The cmdlet is not run. |
| 132 | +
|
| 133 | +```yaml |
| 134 | +Type: SwitchParameter |
| 135 | +Parameter Sets: (All) |
| 136 | +Aliases: wi |
| 137 | + |
| 138 | +Required: False |
| 139 | +Position: Named |
| 140 | +Default value: None |
| 141 | +Accept pipeline input: False |
| 142 | +Accept wildcard characters: False |
| 143 | +``` |
| 144 | +
|
| 145 | +### CommonParameters |
| 146 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). |
| 147 | +
|
| 148 | +## INPUTS |
| 149 | +
|
| 150 | +### None |
| 151 | +
|
| 152 | +## OUTPUTS |
| 153 | +
|
| 154 | +### TeamsTemplatePermissionPolicy.Cmdlets.TeamsTemplatePermissionPolicy |
| 155 | +
|
| 156 | +## NOTES |
| 157 | +
|
| 158 | +## RELATED LINKS |
| 159 | +[Get-CsTeamsTemplatePermissionPolicy](Get-CsTeamsTemplatePermissionPolicy.md) |
| 160 | +
|
| 161 | +[Remove-CsTeamsTemplatePermissionPolicy](Remove-CsTeamsTemplatePermissionPolicy.md) |
| 162 | +
|
| 163 | +[Set-CsTeamsTemplatePermissionPolicy](Set-CsTeamsTemplatePermissionPolicy.md) |
0 commit comments