Commands › Microsoft Teams
Remove-CsGroupPolicyAssignment
This cmdlet is used to remove a group policy assignment.
Quick start script
# Remove-CsGroupPolicyAssignment — 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-CsGroupPolicyAssignment
$before | Format-List
# 3. Make the change (dry run first)
Remove-CsGroupPolicyAssignment -GroupId <String> -PolicyType <String> -WhatIf
Remove-CsGroupPolicyAssignment -GroupId <String> -PolicyType <String>
# 4. Verify and diff
$after = Get-CsGroupPolicyAssignment
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Remove-CsGroupPolicyAssignment -GroupId <String> -PolicyType <String> [-Break]
[-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-PassThru] [-Proxy <Uri>]
[-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters (11)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.