|
| 1 | +--- |
| 2 | +external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml |
| 3 | +Module Name: MicrosoftTeams |
| 4 | +title: Grant-CsGroupPolicyPackageAssignment |
| 5 | +author: icchan |
| 6 | +ms.author: icchan |
| 7 | +manager: amitar |
| 8 | +online version: https://docs.microsoft.com/powershell/module/teams/grant-csgrouppolicypackageassignment |
| 9 | +schema: 2.0.0 |
| 10 | +--- |
| 11 | + |
| 12 | +# Grant-CsGroupPolicyPackageAssignment |
| 13 | + |
| 14 | +## SYNOPSIS |
| 15 | + |
| 16 | +This cmdlet applies a policy package to a group in a tenant. |
| 17 | + |
| 18 | +## SYNTAX |
| 19 | + |
| 20 | +``` |
| 21 | +Grant-CsUserPolicyPackage -Identity <String> -PackageName <String> [-Priority <String>] [<CommonParameters>] |
| 22 | +``` |
| 23 | + |
| 24 | +## DESCRIPTION |
| 25 | + |
| 26 | +This cmdlet applies a policy package to a group in a tenant. Provide a group identity to assign the package with all the associated policies. The available policy packages and their definitions can be found by running Get-CsPolicyPackage. Priority can be optionally specified to determine which policies in a package will be applied to the user in case they belong to two or more groups. If priority is not specified, the group's package assignment will be ranked last in priority. If a user was directly assigned a package, direct assignment takes precedence over group assignment. For more information on priority and group policy assignments, please review [this section](New-CsGroupPolicyAssignment.md#description). For more information on policy packages, please review https://docs.microsoft.com/en-us/MicrosoftTeams/manage-policy-packages |
| 27 | + |
| 28 | +## EXAMPLES |
| 29 | + |
| 30 | +### Example 1 |
| 31 | +```powershell |
| 32 | +PS C:\> Grant-CsGroupPolicyPackageAssignment -Identity 1bc0b35f-095a-4a37-a24c-c4b6049816ab -PackageName Education_PrimaryStudent |
| 33 | +``` |
| 34 | + |
| 35 | +Applies the Education_PrimaryStudent policy package to the group in the tenant. |
| 36 | + |
| 37 | +### Example 2 |
| 38 | +```powershell |
| 39 | +PS C:\> Grant-CsGroupPolicyPackageAssignment -Identity 1bc0b35f-095a-4a37-a24c-c4b6049816ab -PackageName Education_Teacher -Priority 2 |
| 40 | +``` |
| 41 | + |
| 42 | +Applies the Education_Teacher policy package to the group in the tenant with a priority of 2, which means each policy in the package will be assigned to the group with a priority of 2. |
| 43 | + |
| 44 | +## PARAMETERS |
| 45 | + |
| 46 | +### -Identity |
| 47 | + |
| 48 | +A group id in the tenant. It can either be a group's object id or a group's email address. |
| 49 | + |
| 50 | +```yaml |
| 51 | +Type: String |
| 52 | +Parameter Sets: (All) |
| 53 | +Aliases: |
| 54 | +Applicable: Microsoft Teams |
| 55 | +Required: True |
| 56 | +Position: 0 |
| 57 | +Default value: None |
| 58 | +Accept pipeline input: False |
| 59 | +Accept wildcard characters: False |
| 60 | +``` |
| 61 | +
|
| 62 | +### -PackageName |
| 63 | +
|
| 64 | +The name of a specific policy package to apply. All possible policy package names can be found by running Get-CsPolicyPackage. |
| 65 | +
|
| 66 | +```yaml |
| 67 | +Type: String |
| 68 | +Parameter Sets: (All) |
| 69 | +Aliases: |
| 70 | +Applicable: Microsoft Teams |
| 71 | +Required: True |
| 72 | +Position: 1 |
| 73 | +Default value: None |
| 74 | +Accept pipeline input: False |
| 75 | +Accept wildcard characters: False |
| 76 | +``` |
| 77 | +
|
| 78 | +### -Priority |
| 79 | +
|
| 80 | +The priority of the package assignment, relative to other group package assignments that contain one or more of the same policy types. |
| 81 | +
|
| 82 | +```yaml |
| 83 | +Type: String |
| 84 | +Parameter Sets: (All) |
| 85 | +Aliases: |
| 86 | +Applicable: Microsoft Teams |
| 87 | +Required: False |
| 88 | +Position: 2 |
| 89 | +Default value: None |
| 90 | +Accept pipeline input: False |
| 91 | +Accept wildcard characters: False |
| 92 | +``` |
| 93 | +
|
| 94 | +### CommonParameters |
| 95 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). |
| 96 | +
|
| 97 | +## INPUTS |
| 98 | +
|
| 99 | +## OUTPUTS |
| 100 | +
|
| 101 | +## NOTES |
| 102 | +
|
| 103 | +## RELATED LINKS |
| 104 | +
|
| 105 | +[Get-CsPolicyPackage](Get-CsPolicyPackage.md) |
| 106 | +
|
| 107 | +[New-CsGroupPolicyAssignment](New-CsGroupPolicyAssignment.md) |
0 commit comments