Skip to content

Commit 86797be

Browse files
authored
Merge pull request #11616 from ArtemiyKozlov/arkozlov/teamsWorkLocationDetectionPolicy
Add TeamsWorkLocationDetectionPolicy cmdlets public docs Sign off label was applied by Rui previously, filenames use powershell casing in this repository. Merging changes to unblock contributor.
2 parents c079672 + 0fa4cba commit 86797be

5 files changed

+723
-0
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
external help file: Microsoft.Teams.Policy.Administration.Cmdlets.Core.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version: https://learn.microsoft.com/powershell/module/teams/get-csteamsworklocationdetectionpolicy
5+
schema: 2.0.0
6+
ms.author: arkozlov
7+
manager: prashibadkur
8+
author: artemiykozlov
9+
---
10+
11+
# Get-CsTeamsWorkLocationDetectionPolicy
12+
13+
## SYNOPSIS
14+
This cmdlet is used to fetch policy instances of TeamsWorkLocationDetectionPolicy.
15+
16+
## SYNTAX
17+
18+
### Identity (Default)
19+
```
20+
Get-CsTeamsWorkLocationDetectionPolicy [[-Identity] <String>] [<CommonParameters>]
21+
```
22+
23+
### Filter
24+
```
25+
Get-CsTeamsWorkLocationDetectionPolicy [-Filter <String>] [<CommonParameters>]
26+
```
27+
28+
## DESCRIPTION
29+
Fetches instances of TeamsWorkLocationDetectionPolicy. Each policy object contains a property called `EnableWorkLocationDetection`. This setting allows your organization to collect the work location of users when they connect, interact, or are detected near your organization's networks and devices. It also captures the geographic location information users share from personal and mobile devices.
30+
This gives users the ability to consent to the use of this location data to set their current work location.Microsoft collects this information to provide users with a consistent location-based experience and to improve the hybrid work experience in Microsoft 365 according to the [Microsoft Privacy Statement](https://go.microsoft.com/fwlink/?LinkId=521839).
31+
32+
## EXAMPLES
33+
34+
### Example 1
35+
```powershell
36+
PS C:\> Get-CsTeamsWorkLocationDetectionPolicy
37+
```
38+
```output
39+
Identity EnableWorkLocationDetection
40+
-------- ----------------------
41+
Global False
42+
Tag:wld-enabled True
43+
Tag:wld-disabled False
44+
```
45+
Fetches all the policy instances currently available.
46+
47+
### Example 2
48+
```powershell
49+
PS C:\> Get-CsTeamsWorkLocationDetectionPolicy -Identity wld-enabled
50+
```
51+
```output
52+
Identity EnableWorkLocationDetection
53+
-------- ----------------------
54+
Tag:wld-enabled True
55+
```
56+
Fetches an instance of a policy with a known identity.
57+
58+
### Example 3
59+
```powershell
60+
PS C:\> Get-CsTeamsWorkLocationDetectionPolicy -Filter *wld*
61+
```
62+
```output
63+
Identity EnableWorkLocationDetection
64+
-------- ----------------------
65+
Tag:wld-enabled True
66+
Tag:wld-disabled False
67+
```
68+
The `Filter` parameter can be used to fetch policy instances based on partial matches on Identity.
69+
70+
Note: _The "Tag:" prefix can be ignored when specifying the identity._
71+
72+
## PARAMETERS
73+
74+
### -Filter
75+
This parameter can be used to fetch policy instances based on partial matches on the Identity field.
76+
77+
```yaml
78+
Type: String
79+
Parameter Sets: Filter
80+
Aliases:
81+
82+
Required: False
83+
Position: Named
84+
Default value: None
85+
Accept pipeline input: False
86+
Accept wildcard characters: False
87+
```
88+
89+
### -Identity
90+
This parameter can be used to fetch a specific instance of the policy.
91+
92+
```yaml
93+
Type: String
94+
Parameter Sets: Identity
95+
Aliases:
96+
97+
Required: False
98+
Position: 1
99+
Default value: None
100+
Accept pipeline input: False
101+
Accept wildcard characters: False
102+
```
103+
104+
### CommonParameters
105+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
106+
107+
## INPUTS
108+
109+
### System.String
110+
111+
## OUTPUTS
112+
113+
### TeamsWorkLocationDetectionPolicy.Cmdlets.TeamsWorkLocationDetectionPolicy
114+
115+
## NOTES
116+
117+
## RELATED LINKS
118+
[New-CsTeamsWorkLocationDetectionPolicy](New-CsTeamsWorkLocationDetectionPolicy.md)
119+
120+
[Remove-CsTeamsWorkLocationDetectionPolicy](Remove-CsTeamsWorkLocationDetectionPolicy.md)
121+
122+
[Set-CsTeamsWorkLocationDetectionPolicy](Set-CsTeamsWorkLocationDetectionPolicy.md)
123+
124+
[Grant-CsTeamsWorkLocationDetectionPolicy](Grant-CsTeamsWorkLocationDetectionPolicy.md)
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
external help file: Microsoft.Teams.Policy.Administration.Cmdlets.Core.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version: https://learn.microsoft.com/powershell/module/teams/grant-csteamsworklocationdetectionpolicy
5+
schema: 2.0.0
6+
ms.author: arkozlov
7+
manager: prashibadkur
8+
author: artemiykozlov
9+
---
10+
11+
# Grant-CsTeamsWorkLocationDetectionPolicy
12+
13+
## SYNOPSIS
14+
This cmdlet applies an instance of the TeamsWorkLocationDetectionPolicy to users or groups in a tenant.
15+
16+
## SYNTAX
17+
18+
### Identity (Default)
19+
```
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>]
37+
```
38+
39+
## 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.
44+
45+
## EXAMPLES
46+
47+
### Example 1
48+
```powershell
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
65+
```
66+
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._
75+
76+
## PARAMETERS
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+
123+
### -Identity
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.
131+
132+
```yaml
133+
Type: String
134+
Parameter Sets: GrantToUser
135+
Aliases:
136+
137+
Required: True
138+
Position: Named
139+
Default value: None
140+
Accept pipeline input: False
141+
Accept wildcard characters: False
142+
```
143+
144+
### -PolicyName
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".
146+
147+
```yaml
148+
Type: String
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
165+
Aliases:
166+
167+
Required: True
168+
Position: Named
169+
Default value: None
170+
Accept pipeline input: False
171+
Accept wildcard characters: False
172+
```
173+
174+
### CommonParameters
175+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
176+
177+
## INPUTS
178+
179+
### System.String
180+
181+
## OUTPUTS
182+
183+
### System.Void
184+
185+
## NOTES
186+
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

Comments
 (0)