|
| 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 | +**Note:** This cmdlet is currently only available in private preview in the pre-release Teams PowerShell module. |
| 17 | + |
| 18 | +This cmdlet applies a policy package to a group in a tenant. |
| 19 | + |
| 20 | +## SYNTAX |
| 21 | + |
| 22 | +``` |
| 23 | +Grant-CsUserPolicyPackage -GroupId <String> -PackageName <String> [-Rank <String>] [<CommonParameters>] |
| 24 | +``` |
| 25 | + |
| 26 | +## DESCRIPTION |
| 27 | + |
| 28 | +This cmdlet applies a policy package to a group in a tenant. Provide a group id to assign the package with all the associated policies. The available policy packages and their definitions can be found by running Get-CsPolicyPackage. Rank 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 rank is not specified, the group's package assignment will be ranked last. If a user was directly assigned a package, direct assignment takes precedence over group assignment. For more information on rank and group policy assignments, please review [this section](New-CsGroupPolicyAssignment.md#description). For more information on policy packages, please review https://docs.microsoft.com/MicrosoftTeams/manage-policy-packages. |
| 29 | + |
| 30 | +## EXAMPLES |
| 31 | + |
| 32 | +### Example 1 |
| 33 | +```powershell |
| 34 | +PS C:\> Grant-CsGroupPolicyPackageAssignment -GroupId 1bc0b35f-095a-4a37-a24c-c4b6049816ab -PackageName Education_PrimaryStudent |
| 35 | +``` |
| 36 | + |
| 37 | +Applies the Education_PrimaryStudent policy package to the group in the tenant. |
| 38 | + |
| 39 | +### Example 2 |
| 40 | +```powershell |
| 41 | +PS C:\> Grant-CsGroupPolicyPackageAssignment -GroupId 1bc0b35f-095a-4a37-a24c-c4b6049816ab -PackageName Education_Teacher -Rank 2 |
| 42 | +``` |
| 43 | + |
| 44 | +Applies the Education_Teacher policy package to the group in the tenant with a rank of 2, which means each policy in the package will be assigned to the group with a rank of 2. |
| 45 | + |
| 46 | +## PARAMETERS |
| 47 | + |
| 48 | +### -GroupId |
| 49 | + |
| 50 | +A group id in the tenant. It can either be a group's object id or a group's email address. |
| 51 | + |
| 52 | +```yaml |
| 53 | +Type: String |
| 54 | +Parameter Sets: (All) |
| 55 | +Aliases: |
| 56 | +Applicable: Microsoft Teams |
| 57 | +Required: True |
| 58 | +Position: 0 |
| 59 | +Default value: None |
| 60 | +Accept pipeline input: False |
| 61 | +Accept wildcard characters: False |
| 62 | +``` |
| 63 | +
|
| 64 | +### -PackageName |
| 65 | +
|
| 66 | +The name of a specific policy package to apply. All possible policy package names can be found by running Get-CsPolicyPackage. To remove the currently assigned package, use $null or an empty string "". This will not remove any policy assignments, just the package assigned value. |
| 67 | +
|
| 68 | +```yaml |
| 69 | +Type: String |
| 70 | +Parameter Sets: (All) |
| 71 | +Aliases: |
| 72 | +Applicable: Microsoft Teams |
| 73 | +Required: True |
| 74 | +Position: 1 |
| 75 | +Default value: None |
| 76 | +Accept pipeline input: False |
| 77 | +Accept wildcard characters: False |
| 78 | +``` |
| 79 | +
|
| 80 | +### -Rank |
| 81 | +
|
| 82 | +The rank of the package assignment, relative to other group package assignments that contain one or more of the same policy types. |
| 83 | +
|
| 84 | +```yaml |
| 85 | +Type: String |
| 86 | +Parameter Sets: (All) |
| 87 | +Aliases: |
| 88 | +Applicable: Microsoft Teams |
| 89 | +Required: False |
| 90 | +Position: 2 |
| 91 | +Default value: None |
| 92 | +Accept pipeline input: False |
| 93 | +Accept wildcard characters: False |
| 94 | +``` |
| 95 | +
|
| 96 | +### CommonParameters |
| 97 | +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). |
| 98 | +
|
| 99 | +## INPUTS |
| 100 | +
|
| 101 | +## OUTPUTS |
| 102 | +
|
| 103 | +## NOTES |
| 104 | +
|
| 105 | +## RELATED LINKS |
| 106 | +
|
| 107 | +[Get-CsPolicyPackage](Get-CsPolicyPackage.md) |
| 108 | +
|
| 109 | +[New-CsGroupPolicyAssignment](New-CsGroupPolicyAssignment.md) |
0 commit comments