Commands › Microsoft Teams
Grant-CsUserPolicyPackage
This cmdlet supports applying a policy package to users in a tenant. Note that there is a limit of 20 users you can apply the package to at a time. To apply a policy package to a larger number of users, consider using New-CsBatchPolicyPackageAssignmentOperation.
Quick start script
# Grant-CsUserPolicyPackage — 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-CsUserPolicyPackage -Identity <String[]> -PackageName <String> | Format-List
# 3. Export for evidence / drift tracking
Grant-CsUserPolicyPackage | Export-Clixml .\CsUserPolicyPackage-$(Get-Date -Format yyyyMMdd).xml
Syntax
Grant-CsUserPolicyPackage [-Identity] <String[]> [-PackageName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
Parameters (4)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.