Editar

Compartir a través de


Remove-CsTeamsTemplatePermissionPolicy

Deletes an instance of TeamsTemplatePermissionPolicy.

Syntax

Remove-CsTeamsTemplatePermissionPolicy
      [-Identity] <String>
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Deletes an instance of TeamsTemplatePermissionPolicy. The Identity parameter accepts the identity of the policy instance to delete.

Examples

Example 1

PS >Remove-CsTeamsTemplatePermissionPolicy -Identity Foobar

Deletes a policy instance with the Identity Foobar.

Example 2

PS >Remove-CsTeamsTemplatePermissionPolicy -Identity Foobar

Remove-CsTeamsTemplatePermissionPolicy : The policy "Foobar" is currently assigned to one or more users or groups. Ensure policy is not assigned before removing. Please refer to documentation. CorrelationId: 8622aac5-00c3-4071-b6d0-d070db8f663f
At line:1 char:1
+ Remove-CsTeamsTemplatePermissionPolicy -Identity Foobar ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-CsTeamsTemplatePermissionPolicy], PolicyRpException
    + FullyQualifiedErrorId : ClientError,Microsoft.Teams.Policy.Administration.Cmdlets.Core.RemoveTeamsTemplatePermissionPolicyCmdlet

Attempting to delete a policy instance that is currently assigned to users will result in an error. Remove the assignment before attempting to delete it.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.

You can use this switch to run tasks programmatically where prompting for administrative input is inappropriate.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Identity

Name of the policy instance to be deleted.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

Outputs

System.Void