Skip to content

Commit c6b56d6

Browse files
authored
Merge branch 'master' into patch-222
2 parents b6725af + 4054fc3 commit c6b56d6

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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: dasosby
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 assigns a policy package to a group in a tenant.
19+
20+
## SYNTAX
21+
22+
```
23+
Grant-CsGroupPolicyPackageAssignment -GroupId <String> -PackageName <String> [-PolicyRankings <String[]>] [<CommonParameters>]
24+
```
25+
26+
## DESCRIPTION
27+
28+
This cmdlet assigns a policy package to a group in a tenant. The available policy packages and their definitions can be found by running Get-CsPolicyPackage. For more information on policy packages, please review [Manage policy packages in Microsoft Teams](https://docs.microsoft.com/MicrosoftTeams/manage-policy-packages).
29+
30+
Policy rankings can be optionally specified for each policy type in the package to determine which policies will be assigned to the user in case they belong to two or more groups. If policy rankings for a policy type is not specified, one of two things can happen:
31+
32+
- If the policy type was previously assigned to the group, the ranking for the policy type will not change.
33+
- If the policy type was not previously assigned to the group, the ranking for the policy type will be ranked last.
34+
35+
Finally, if a user was directly assigned a package, direct assignment takes precedence over group assignment. For more information on policy rankings and group policy assignments, please review [the description section under New-CsGroupPolicyAssignment](New-CsGroupPolicyAssignment.md#description).
36+
37+
## EXAMPLES
38+
39+
### Example 1
40+
```powershell
41+
PS C:\> Grant-CsGroupPolicyPackageAssignment -GroupId 1bc0b35f-095a-4a37-a24c-c4b6049816ab -PackageName Education_PrimaryStudent
42+
```
43+
44+
Assigns the Education_PrimaryStudent policy package to the group. The group will receive the lowest policy ranking for each policy type in the Education_PrimaryStudent package if the policy type is newly assigned to the group. If a policy type was already assigned to the group, the group will receive the same policy ranking as before.
45+
46+
### Example 2
47+
```powershell
48+
PS C:\> Grant-CsGroupPolicyPackageAssignment -GroupId 1bc0b35f-095a-4a37-a24c-c4b6049816ab -PackageName Education_Teacher -PolicyRankings "TeamsMessagingPolicy, 1", "TeamsMeetingPolicy, 1", "TeamsCallingPolicy, 2"
49+
```
50+
51+
Assigns the Education_Teacher policy package to the group. The group will receive a policy ranking of 1 for TeamsMessagingPolicy policy type, a policy ranking of 1 for TeamsMeetingPolicy policy type and a policy ranking of 2 for TeamsCallingPolicy policy type. For each unspecified policy type in the package, the group will receive the lowest policy ranking if it is newly assigned to the group. If a policy type was already assigned to the group, the group will receive the same policy ranking as before.
52+
53+
## PARAMETERS
54+
55+
### -GroupId
56+
57+
A group id in the tenant. It can either be a group's object id or a group's email address.
58+
59+
```yaml
60+
Type: String
61+
Parameter Sets: (All)
62+
Aliases:
63+
Applicable: Microsoft Teams
64+
Required: True
65+
Position: 0
66+
Default value: None
67+
Accept pipeline input: False
68+
Accept wildcard characters: False
69+
```
70+
71+
### -PackageName
72+
73+
The name of a policy package. All policy package names can be found by running Get-CsPolicyPackage. To reset the currently assigned package value for the group, use $null or an empty string "". This will not remove any existing policy assignments to the group.
74+
75+
```yaml
76+
Type: String
77+
Parameter Sets: (All)
78+
Aliases:
79+
Applicable: Microsoft Teams
80+
Required: True
81+
Position: 1
82+
Default value: None
83+
Accept pipeline input: False
84+
Accept wildcard characters: False
85+
```
86+
87+
### -PolicyRankings
88+
89+
The policy rankings for each of the policy types in the package. To specify the policy rankings, follow this format: "\<PolicyType\>, \<PolicyRank\>". Delimiters of ' ', '.', ':', '\t' are also acceptable. Supported policy types of a policy package are listed [here](https://docs.microsoft.com/MicrosoftTeams/manage-policy-packages#what-is-a-policy-package). Policy rank must be a number greater than or equal to 1.
90+
91+
```yaml
92+
Type: String[]
93+
Parameter Sets: (All)
94+
Aliases:
95+
Applicable: Microsoft Teams
96+
Required: False
97+
Position: 2
98+
Default value: None
99+
Accept pipeline input: False
100+
Accept wildcard characters: False
101+
```
102+
103+
### CommonParameters
104+
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).
105+
106+
## INPUTS
107+
108+
## OUTPUTS
109+
110+
## NOTES
111+
112+
## RELATED LINKS
113+
114+
[Get-CsPolicyPackage](Get-CsPolicyPackage.md)
115+
116+
[New-CsGroupPolicyAssignment](New-CsGroupPolicyAssignment.md)

0 commit comments

Comments
 (0)