Commands › Microsoft Teams

Grant-CsTeamsChannelsPolicy

Microsoft Teams MicrosoftTeams Grant-*

The Grant-CsTeamsChannelsPolicy allows you to assign specific policies to users that have been created in your tenant.

Quick start script

# Grant-CsTeamsChannelsPolicy — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Run and inspect
Grant-CsTeamsChannelsPolicy -Group <String> -PolicyName <String> | Format-List

# 3. Export for evidence / drift tracking
Grant-CsTeamsChannelsPolicy | Export-Clixml .\CsTeamsChannelsPolicy-$(Get-Date -Format yyyyMMdd).xml

Syntax — 3 parameter sets

Identity (Default)

Grant-CsTeamsChannelsPolicy [[-Identity] <UserIdParameter>] [-PolicyName] <String> [-Tenant <System.Guid>]
 [-DomainController <Fqdn>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

GrantToTenant

Grant-CsTeamsChannelsPolicy [-PolicyName] <String> [-Tenant <System.Guid>] [-DomainController <Fqdn>]
 [-PassThru] [-Global] [-WhatIf] [-Confirm] [<CommonParameters>]

GrantToGroup

Grant-CsTeamsChannelsPolicy [-PassThru] [[-PolicyName] <String>] [-MsftInternalProcessingMode <String>]
 -Group <String> [-Rank <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (10)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-DomainController Fqdn Internal Microsoft usage only.
-Global SwitchParameter Use the -Global flag to convert the values of the Global policy to the values of the specified policy.
-Group String yes Specifies the group used for the group policy assignment.
-Identity UserIdParameter Specify the user to whom the policy is being assigned.
-PassThru SwitchParameter {{ Fill PassThru Description }}
-PolicyName String yes Specify the policy that should be granted to the user
-Rank Int32 The rank of the policy assignment, relative to other group policy assignments for the same policy type.
-Tenant Guid Internal Microsoft use only.
-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.