1
1
---
2
2
external help file : Microsoft.Teams.Policy.Administration.Cmdlets.Core.dll-Help.xml
3
- Module Name : Microsoft.Teams.Policy.Administration.Cmdlets.Core
4
- online version :
3
+ Module Name : MicrosoftTeams
4
+ online version : https://learn.microsoft.com/powershell/module/skype/grant-csteamsworklocationdetectionpolicy
5
5
schema : 2.0.0
6
+ ms.author : arkozlov
7
+ manager : prashibadkur
8
+ author : artemiykozlov
6
9
---
7
10
8
11
# Grant-CsTeamsWorkLocationDetectionPolicy
9
12
10
13
## SYNOPSIS
11
- {{ Fill in the Synopsis }}
14
+ This cmdlet applies an instance of the TeamsWorkLocationDetectionPolicy to users or groups in a tenant.
12
15
13
16
## SYNTAX
14
17
18
+ ### Identity (Default)
15
19
```
16
- Grant-CsTeamsWorkLocationDetectionPolicy -Identity <String> -PolicyName <String> [<CommonParameters>]
20
+ Grant-CsTeamsWorkLocationDetectionPolicy [<CommonParameters>]
21
+ ```
22
+
23
+ ### GrantToUser
24
+ ```
25
+ Grant-CsTeamsWorkLocationDetectionPolicy -Identity <String> [[-PolicyName] <String>] [<CommonParameters>]
26
+ ```
27
+
28
+ ### GrantToGroup
29
+ ```
30
+ Grant-CsTeamsWorkLocationDetectionPolicy [[-PolicyName] <String>] [-Group] <String> -Rank <Int32>
31
+ [<CommonParameters>]
32
+ ```
33
+
34
+ ### GrantToTenant
35
+ ```
36
+ Grant-CsTeamsWorkLocationDetectionPolicy [[-PolicyName] <String>] [-Global] [-Force] [<CommonParameters>]
17
37
```
18
38
19
39
## DESCRIPTION
20
- {{ Fill in the Description }}
40
+
41
+ This cmdlet applies an instance of the TeamsWorkLocationDetectionPolicy to users or groups in a tenant.
42
+
43
+ Passes in the ` Identity ` of the policy instance in the ` PolicyName ` parameter and the user identifier in the ` Identity ` parameter or the group name in the ` Group ` parameter. One of either ` Identity ` or ` Group ` needs to be passed.
21
44
22
45
## EXAMPLES
23
46
24
47
### Example 1
25
48
``` powershell
26
- PS C:\> {{ Add example code here }}
49
+ PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -PolicyName sms-enabled -Identity [email protected]
50
+ ```
51
+
52
+ Assigns a given policy to a user.
53
+
54
+ ### Example 2
55
+ ``` powershell
56
+ PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -Group f13d6c9d-ce76-422c-af78-b6018b4d9c80 -PolicyName wld-enabled
57
+ ```
58
+
59
+ Assigns a given policy to a group.
60
+
61
+
62
+ ### Example 3
63
+ ``` powershell
64
+ PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -Global -PolicyName wld-enabled
27
65
```
28
66
29
- {{ Add example description here }}
67
+ Assigns a given policy to the tenant.
68
+
69
+ ### Example 3
70
+ ``` powershell
71
+ PS C:\> Grant-CsTeamsWorkLocationDetectionPolicy -Global -PolicyName wld-enabled
72
+ ```
73
+
74
+ Note: _ Using $null in place of a policy name can be used to unassigned a policy instance._
30
75
31
76
## PARAMETERS
32
77
78
+ ### -Force
79
+ Suppresses the display of any non-fatal error message that might arise when running the command.
80
+
81
+ ``` yaml
82
+ Type : SwitchParameter
83
+ Parameter Sets : GrantToTenant
84
+ Aliases :
85
+
86
+ Required : False
87
+ Position : Named
88
+ Default value : None
89
+ Accept pipeline input : False
90
+ Accept wildcard characters : False
91
+ ` ` `
92
+
93
+ ### -Global
94
+ This is the equivalent to ` -Identity Global`.
95
+
96
+ ` ` ` yaml
97
+ Type: SwitchParameter
98
+ Parameter Sets: GrantToTenant
99
+ Aliases:
100
+
101
+ Required: True
102
+ Position: 0
103
+ Default value: None
104
+ Accept pipeline input: False
105
+ Accept wildcard characters: False
106
+ ` ` `
107
+
108
+ # ## -Group
109
+ This is the identifier of the group that the policy should be assigned to.
110
+
111
+ ` ` ` yaml
112
+ Type: String
113
+ Parameter Sets: GrantToGroup
114
+ Aliases:
115
+
116
+ Required: True
117
+ Position: 0
118
+ Default value: None
119
+ Accept pipeline input: False
120
+ Accept wildcard characters: False
121
+ ` ` `
122
+
33
123
# ## -Identity
34
- {{ Fill Identity Description }}
124
+ Specifies the identity of the target user.
125
+
126
+
127
+
128
+ Example : 98403f08-577c-46dd-851a-f0460a13b03d
129
+
130
+ Use the "Global" Identity if you wish to set the policy for the entire tenant.
35
131
36
132
` ` ` yaml
37
133
Type: String
38
- Parameter Sets : (All)
134
+ Parameter Sets: GrantToUser
39
135
Aliases:
40
136
41
137
Required: True
@@ -46,11 +142,26 @@ Accept wildcard characters: False
46
142
` ` `
47
143
48
144
# ## -PolicyName
49
- {{ Fill PolicyName Description }}
145
+ Specifies the name of the policy to be assigned. The PolicyName is the policy identity minus the policy scope ("tag:"), for example, a policy that has an identity of "Tag:Enabled" has a PolicyName of "Enabled".
50
146
51
147
` ` ` yaml
52
148
Type: String
53
- Parameter Sets : (All)
149
+ Parameter Sets: GrantToUser, GrantToGroup, GrantToTenant
150
+ Aliases:
151
+
152
+ Required: False
153
+ Position: 1
154
+ Default value: None
155
+ Accept pipeline input: False
156
+ Accept wildcard characters: False
157
+ ` ` `
158
+
159
+ # ## -Rank
160
+ The rank of the policy assignment, relative to other group policy assignments for the same policy type.
161
+
162
+ ` ` ` yaml
163
+ Type: Int32
164
+ Parameter Sets: GrantToGroup
54
165
Aliases:
55
166
56
167
Required: True
@@ -65,11 +176,19 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
65
176
66
177
# # INPUTS
67
178
68
- ### None
179
+ # ## System.String
69
180
70
181
# # OUTPUTS
71
182
72
- ### System.Object
183
+ # ## System.Void
184
+
73
185
# # NOTES
74
186
75
187
# # RELATED LINKS
188
+ [Get-CsTeamsWorkLocationDetectionPolicy](Get-CsTeamsWorkLocationDetectionPolicy.md)
189
+
190
+ [New-CsTeamsWorkLocationDetectionPolicy](New-CsTeamsWorkLocationDetectionPolicy.md)
191
+
192
+ [Set-CsTeamsWorkLocationDetectionPolicy](Set-CsTeamsWorkLocationDetectionPolicy.md)
193
+
194
+ [Remove-CsTeamsWorkLocationDetectionPolicy](Remove-CsTeamsWorkLocationDetectionPolicy.md)
0 commit comments