I am trying to delete a sensitivity label with remove-label command in powershell. Any advice?
PS C:\> Get-Label
Name Disabled
General False
WARNING: OnAfterGetLabels: failed to get template:[8c5baa1c-c20e-4b0b-9037-976ac2df69f0]
PII False
PS C:\> Remove-Label -Identity 'PII'
WARNING: Encountered exception: Microsoft.Exchange.Management.Transport.ErrorCannotRemovePendingDeletionRuleException:
We cannot remove rule 'PII' since it is already in pending deletion state.
at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object
target, String helpUrl)
at Microsoft.Office.CompliancePolicy.Tasks.RemoveComplianceRuleBase.InternalValidate()
at Microsoft.Office.CompliancePolicy.Tasks.RemoveLabel.InternalValidate()
WARNING: Validation failed: Microsoft.Exchange.Management.Transport.ErrorCannotRemovePendingDeletionRuleException: We
cannot remove rule 'PII' since it is already in pending deletion state.
at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object
target, String helpUrl)
at Microsoft.Office.CompliancePolicy.Tasks.RemoveComplianceRuleBase.InternalValidate()
at Microsoft.Office.CompliancePolicy.Tasks.RemoveLabel.InternalValidate()