Skip to content

Commit 13b42a4

Browse files
authored
Merge pull request MicrosoftDocs#4095 from tomkau/master
New Teams group policy assignment related documentation
2 parents 5ac72dc + 0b5e7a1 commit 13b42a4

File tree

4 files changed

+523
-0
lines changed

4 files changed

+523
-0
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version:
5+
schema: 2.0.0
6+
author: tomkau
7+
ms.author: tomkau
8+
ms.reviewer:
9+
---
10+
11+
# Get-CsGroupPolicyAssignment
12+
13+
## SYNOPSIS
14+
This cmdlet is used to return group policy assignments.
15+
16+
## SYNTAX
17+
18+
```
19+
Get-CsGroupPolicyAssignment [-GroupId <String>] [-PolicyType <String>]
20+
```
21+
22+
## DESCRIPTION
23+
This cmdlets returns group policy assignments. Optional parameters allow the results to be restricted to policies assigned to a specific group or policies of a specific type.
24+
25+
## EXAMPLES
26+
27+
### Example 1
28+
In this example, all group policy assignments are returned.
29+
30+
```
31+
Get-CsGroupPolicyAssignment
32+
33+
GroupId PolicyName PolicyType Priority
34+
------- ---------- ---------- --------
35+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
36+
e050ce51-54bc-45b7-b3e6-c00343d31274 Tenant:SalesMessaging TeamsMessagingPolicy 2
37+
e050ce51-54bc-45b7-b3e6-c00343d31274 Host:AllOff TeamsMeetingPolicy 2
38+
566b8d39-5c5c-4aaa-bc07-4f36278a1b38 Host:Kiosk TeamsMeetingPolicy 3
39+
```
40+
41+
### Example 2
42+
In this example, only the policies assigned to a specific group are returned.
43+
44+
```
45+
Get-CsGroupPolicyAssignment -GroupId e050ce51-54bc-45b7-b3e6-c00343d31274
46+
47+
GroupId PolicyName PolicyType Priority
48+
------- ---------- ---------- --------
49+
e050ce51-54bc-45b7-b3e6-c00343d31274 Tenant:SalesMessaging TeamsMessagingPolicy 2
50+
e050ce51-54bc-45b7-b3e6-c00343d31274 Host:AllOff TeamsMeetingPolicy 2
51+
```
52+
53+
### Example 3
54+
In this example, only the policies of a specific type are returned.
55+
56+
Get-CsGroupPolicyAssignment -PolicyType TeamsMeetingPolicy
57+
58+
```
59+
GroupId PolicyName PolicyType Priority
60+
------- ---------- ---------- --------
61+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
62+
e050ce51-54bc-45b7-b3e6-c00343d31274 Host:AllOff TeamsMeetingPolicy 2
63+
566b8d39-5c5c-4aaa-bc07-4f36278a1b38 Host:Kiosk TeamsMeetingPolicy 3
64+
```
65+
66+
## PARAMETERS
67+
68+
### -GroupId
69+
The ID of a group whose policy assignments will be returned.
70+
71+
```yaml
72+
Type: String
73+
Parameter Sets:
74+
Aliases:
75+
76+
Required: False
77+
Position: Named
78+
Default value: None
79+
Accept pipeline input: False
80+
Accept wildcard characters: False
81+
```
82+
83+
### -PolicyType
84+
The policy type for which group policy assignments will be returned.
85+
86+
```yaml
87+
Type: String
88+
Parameter Sets:
89+
Aliases:
90+
91+
Required: False
92+
Position: Named
93+
Default value: None
94+
Accept pipeline input: False
95+
Accept wildcard characters: False
96+
```
97+
98+
### CommonParameters
99+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
100+
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
101+
102+
## INPUTS
103+
104+
## OUTPUTS
105+
106+
## NOTES
107+
108+
## RELATED LINKS
109+
110+
[New-CsGroupPolicyAssignment]()
111+
112+
[Set-CsGroupPolicyAssignment]()
113+
114+
[Remove-CsGroupPolicyAssignment]()
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version:
5+
schema: 2.0.0
6+
author: tomkau
7+
ms.author: tomkau
8+
ms.reviewer:
9+
---
10+
11+
# New-CsGroupPolicyAssignment
12+
13+
## SYNOPSIS
14+
This cmdlet is used to assign a policy to a group.
15+
16+
## SYNTAX
17+
18+
```
19+
New-CsGroupPolicyAssignment -GroupId <String> -PolicyType <String> -PolicyName <String> [-Priority <Int>]
20+
```
21+
22+
## DESCRIPTION
23+
This cmdlet will assign a policy to a group. The group can be specified by object id or by email/SIP address.
24+
25+
The priority is used to determine which policy a user should inherit as their effective policy if they are a member of two or more groups that each have a policy of the same type assigned (and the user has not been directly assigned a policy of the same type).
26+
27+
It’s helpful to think of priority as determining the position of each policy assignment in an ordered list, from highest priority to lowest priority. In fact, priority can be specified as any number, but these are converted into sequential values 1, 2, 3, etc. with 1 being the highest priority. When assigning a policy to a group, set the priority to be the position in the list where you want the new group policy assignment to be. If a priority is not specified, the policy assignment will be given the lowest priority.
28+
29+
## EXAMPLES
30+
31+
### Example 1
32+
In this example, a policy is assigned to a group specified by object id.
33+
34+
```
35+
New-CsGroupPolicyAssignment -GroupId d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 -PolicyType TeamsMeetingPolicy -PolicyName AllOn -Priority 1
36+
37+
Get-CsGroupPolicyAssignment -PolicyType TeamsMeetingPolicy
38+
39+
GroupId PolicyName PolicyType Priority
40+
------- ---------- ---------- --------
41+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
42+
```
43+
44+
### Example 2
45+
In this example, a policy is assigned to a group specified by email/SIP address. The priority is not specified so it will be set to the lowest priority for the given policy type.
46+
47+
```
48+
New-CsGroupPolicyAssignment -GroupId salesdepartment@contoso.com -PolicyType TeamsMeetingPolicy -PolicyName Kiosk
49+
50+
Get-CsGroupPolicyAssignment -PolicyType TeamsMeetingPolicy
51+
52+
GroupId PolicyName PolicyType Priority
53+
------- ---------- ---------- --------
54+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
55+
566b8d39-5c5c-4aaa-bc07-4f36278a1b38 Host:Kiosk TeamsMeetingPolicy 2
56+
```
57+
58+
### Example 3
59+
In this example, the policy assignment priority is set to 2. The current priority 2 policy assignment of the same type will be updated to priority 3.
60+
61+
```
62+
Get-CsGroupPolicyAssignment -PolicyType TeamsMeetingPolicy
63+
64+
GroupId PolicyName PolicyType Priority
65+
------- ---------- ---------- --------
66+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
67+
566b8d39-5c5c-4aaa-bc07-4f36278a1b38 Host:Kiosk TeamsMeetingPolicy 2
68+
69+
New-CsGroupPolicyAssignment -GroupId e050ce51-54bc-45b7-b3e6-c00343d31274 -PolicyType TeamsMeetingpolicy -PolicyName AllOff -Priority 2
70+
71+
Get-CsGroupPolicyAssignment
72+
73+
GroupId PolicyName PolicyType Priority
74+
------- ---------- ---------- --------
75+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
76+
e050ce51-54bc-45b7-b3e6-c00343d31274 Host:AllOff TeamsMeetingPolicy 2
77+
566b8d39-5c5c-4aaa-bc07-4f36278a1b38 Host:Kiosk TeamsMeetingPolicy 3
78+
```
79+
80+
## PARAMETERS
81+
82+
### -GroupId
83+
The ID of a batch policy assignment operation.
84+
85+
```yaml
86+
Type: String
87+
Parameter Sets:
88+
Aliases:
89+
90+
Required: True
91+
Position: Named
92+
Default value: None
93+
Accept pipeline input: False
94+
Accept wildcard characters: False
95+
```
96+
97+
### -PolicyType
98+
The type of the policy to be assigned.
99+
100+
```yaml
101+
Type: String
102+
Parameter Sets:
103+
Aliases:
104+
105+
Required: True
106+
Position: Named
107+
Default value: None
108+
Accept pipeline input: False
109+
Accept wildcard characters: False
110+
```
111+
112+
### -PolicyName
113+
The name of the policy to be assigned.
114+
115+
```yaml
116+
Type: String
117+
Parameter Sets:
118+
Aliases:
119+
120+
Required: True
121+
Position: Named
122+
Default value: None
123+
Accept pipeline input: False
124+
Accept wildcard characters: False
125+
```
126+
127+
### -Priority
128+
The priority of the policy assignment, relative to other group policy assignments for the same policy type.
129+
130+
```yaml
131+
Type: String
132+
Parameter Sets:
133+
Aliases:
134+
135+
Required: False
136+
Position: Named
137+
Default value: None
138+
Accept pipeline input: False
139+
Accept wildcard characters: False
140+
```
141+
142+
### CommonParameters
143+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
144+
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
145+
146+
## INPUTS
147+
148+
## OUTPUTS
149+
150+
### OperationId
151+
The ID of the operation that can be used with the Get-CsBatchPolicyAssignmentOperation cmdlet to get the status of the operation.
152+
153+
## NOTES
154+
155+
## RELATED LINKS
156+
157+
[Get-CsGroupPolicyAssignment]()
158+
159+
[Set-CsGroupPolicyAssignment]()
160+
161+
[Remove-CsGroupPolicyAssignment]()
162+
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version:
5+
schema: 2.0.0
6+
author: tomkau
7+
ms.author: tomkau
8+
ms.reviewer:
9+
---
10+
11+
# Remove-CsGroupPolicyAssignment
12+
13+
## SYNOPSIS
14+
This cmdlet is used to remove a group policy assignment.
15+
16+
## SYNTAX
17+
18+
```
19+
Remove-CsGroupPolicyAssignment -GroupId <String> -PolicyType <String>
20+
```
21+
22+
## DESCRIPTION
23+
This cmdlet removes the policy of a specific type from a group. A group can only be assigned one policy of a given type, so the name of the pokicy tobe removed does not need to be specified.
24+
25+
When a policy assignment is removed from a group, any other group policy assignments of the same type that have lower priority will be updated. For example, if the policy assignment with priority 2 is removed, then the priority 3 and 4 policy assignments will be updated to priority 2 and 3 respectively.
26+
27+
## EXAMPLES
28+
29+
### Example 1
30+
In this example, the policy assignment with priority 2 is removed. As a result, the policy assignment with priority 3 is updated to priority 2.
31+
32+
```
33+
Get-CsGroupPolicyAssignment -PolicyType TeamsMeetingPolicy
34+
35+
GroupId PolicyName PolicyType Priority
36+
------- ---------- ---------- --------
37+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
38+
e050ce51-54bc-45b7-b3e6-c00343d31274 Host:AllOff TeamsMeetingPolicy 2
39+
566b8d39-5c5c-4aaa-bc07-4f36278a1b38 Host:Kiosk TeamsMeetingPolicy 3
40+
41+
Remove-CsGroupPolicyAssignment -GroupId e050ce51-54bc-45b7-b3e6-c00343d31274 -PolicyType TeamsMeetingPolicy
42+
43+
Get-CsGroupPolicyAssignment -PolicyType TeamsMeetingPolicy
44+
45+
GroupId PolicyName PolicyType Priority
46+
------- ---------- ---------- --------
47+
d8ebfa45-0f28-4d2d-9bcc-b158a49e2d17 Host:AllOn TeamsMeetingPolicy 1
48+
566b8d39-5c5c-4aaa-bc07-4f36278a1b38 Host:Kiosk TeamsMeetingPolicy 2
49+
```
50+
51+
## PARAMETERS
52+
53+
### -GroupId
54+
The ID of the group from which the assignment will be removed.
55+
56+
```yaml
57+
Type: String
58+
Parameter Sets:
59+
Aliases:
60+
61+
Required: True
62+
Position: Named
63+
Default value: None
64+
Accept pipeline input: False
65+
Accept wildcard characters: False
66+
```
67+
68+
### -PolicyType
69+
The policy type of the assignment to be removed from the group.
70+
71+
```yaml
72+
Type: String
73+
Parameter Sets:
74+
Aliases:
75+
76+
Required: True
77+
Position: Named
78+
Default value: None
79+
Accept pipeline input: False
80+
Accept wildcard characters: False
81+
```
82+
83+
### CommonParameters
84+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
85+
For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
86+
87+
## INPUTS
88+
89+
## OUTPUTS
90+
91+
### OperationId
92+
The ID of the operation that can be used with the Get-CsBatchPolicyAssignmentOperation cmdlet to get the status propagation of the policy removal to the members of the group.
93+
94+
## NOTES
95+
96+
## RELATED LINKS
97+
98+
[Get-CsGroupPolicyAssignment]()
99+
100+
[New-CsGroupPolicyAssignment]()
101+
102+
[Set-CsGroupPolicyAssignment]()
103+

0 commit comments

Comments
 (0)