Skip to content

Commit 37ca893

Browse files
authored
Shifts policy commandlets
1 parent 01c6809 commit 37ca893

File tree

5 files changed

+576
-0
lines changed

5 files changed

+576
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version: https://docs.microsoft.com/powershell/module/teams/get-teamsshiftspolicy
5+
schema: 2.0.0
6+
---
7+
8+
# Get-CsTeamsShiftsPolicy
9+
10+
## SYNOPSIS
11+
12+
This cmdlet allows you to get properties of a TeamsShiftPolicy instance, including user's shift based presence and Teams off shift warning message-specific settings.
13+
14+
## SYNTAX
15+
16+
### Identity (Default)
17+
```
18+
Get-CsTeamsShiftsPolicy [[-Identity] <XdsIdentity>] [<CommonParameters>]
19+
```
20+
21+
## DESCRIPTION
22+
This cmdlet allows you to get properties of a TeamsShiftPolicy instance. Use this to get the policy name, user's shift based presence(EnableShiftPresence) and Teams off shift warning message-specific settings(ShiftNoticeMessageType, ShiftNoticeMessageCustom, ShiftNoticeFrequency, AccessGracePeriodMinutes).
23+
24+
## EXAMPLES
25+
26+
### Example 1
27+
```powershell
28+
PS C:\> Get-CsTeamsShiftsPolicy
29+
```
30+
31+
Gets the properties of all instances of the TeamsShiftPolicy.
32+
33+
### Example 2
34+
```powershell
35+
PS C:\> Get-CsTeamsShiftsPolicy -Identity OffShiftAccessMessage1Always
36+
```
37+
38+
Gets the properties of the OffShiftAccessMessage1Always instance of the TeamsShiftPolicy.
39+
40+
## PARAMETERS
41+
42+
### -Identity
43+
Policy instance name. Optional.
44+
45+
```yaml
46+
Type: XdsIdentity
47+
Parameter Sets: Identity
48+
Aliases:
49+
Applicable: Microsoft Teams
50+
Required: False
51+
Position: 1
52+
Default value: None
53+
Accept pipeline input: False
54+
Accept wildcard characters: False
55+
```
56+
57+
### CommonParameters
58+
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).
59+
60+
## INPUTS
61+
62+
### None
63+
64+
## OUTPUTS
65+
66+
### System.Object
67+
## NOTES
68+
69+
## RELATED LINKS
70+
71+
[Get-CsTeamsShiftsPolicy](Set-CsTeamsShiftsPolicy.md)
72+
73+
[New-CsTeamsShiftsPolicy](New-CsTeamsShiftsPolicy.md)
74+
75+
[Remove-CsTeamsShiftsPolicy](Remove-CsTeamsShiftsPolicy.md)
76+
77+
[Grant-CsTeamsShiftsPolicy](Grant-CsTeamsShiftsPolicy.md)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version: https://docs.microsoft.com/powershell/module/teams/grant-teamsshiftspolicy
5+
schema: 2.0.0
6+
---
7+
8+
# Grant-CsTeamsShiftsPolicy
9+
10+
## SYNOPSIS
11+
12+
This commandlet supports applying the TeamsShiftsPolicy to users in a tenant.
13+
14+
## SYNTAX
15+
16+
```
17+
Grant-CsTeamsShiftsPolicy [[-Identity] <UserIdParameter>] [-PolicyName] <String> [<CommonParameters>]
18+
```
19+
20+
## DESCRIPTION
21+
This commandlet enables admins to grant Shifts specific policy settings to users in their tenant.
22+
23+
## EXAMPLES
24+
25+
### Example 1
26+
```powershell
27+
PS C:\> Grant-CsTeamsShiftsPolicy -Identity [email protected] -PolicyName OffShiftAccessMessage1Always
28+
```
29+
Applies the OffShiftAccessMessage1Always instance of TeamsShiftsPolicy to one user in the tenant.
30+
31+
## PARAMETERS
32+
33+
### -Identity
34+
UserId to whom the policy is granted. Email id is acceptable.
35+
36+
```yaml
37+
Type: UserIdParameter
38+
Parameter Sets: Identity
39+
Aliases:
40+
Applicable: Microsoft Teams
41+
Required: False
42+
Position: 0
43+
Default value: None
44+
Accept pipeline input: True (ByPropertyName, ByValue)
45+
Accept wildcard characters: False
46+
```
47+
48+
### -PolicyName
49+
The name of the TeamsShiftsPolicy instance that is being applied to the user.
50+
51+
```yaml
52+
Type: String
53+
Parameter Sets: (All)
54+
Aliases:
55+
Applicable: Microsoft Teams
56+
Required: True
57+
Position: 1
58+
Default value: None
59+
Accept pipeline input: False
60+
Accept wildcard characters: False
61+
```
62+
63+
### CommonParameters
64+
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).
65+
66+
## INPUTS
67+
68+
### Microsoft.Rtc.Management.AD.UserIdParameter
69+
70+
## OUTPUTS
71+
72+
### System.Object
73+
## NOTES
74+
75+
## RELATED LINKS
76+
77+
[Get-CsTeamsShiftsPolicy](Get-CsTeamsShiftsPolicy.md)
78+
79+
[New-CsTeamsShiftsPolicy](New-CsTeamsShiftsPolicy.md)
80+
81+
[Set-CsTeamsShiftsPolicy](Set-CsTeamsShiftsPolicy.md)
82+
83+
[Remove-CsTeamsShiftsPolicy](Remove-CsTeamsShiftsPolicy.md)
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version: https://docs.microsoft.com/powershell/module/teams/new-teamsshiftspolicy
5+
schema: 2.0.0
6+
---
7+
8+
# New-CsTeamsShiftsPolicy
9+
10+
## SYNOPSIS
11+
12+
This cmdlet allows you to create a new TeamsShiftPolicy instance and set it's properties.
13+
14+
## SYNTAX
15+
16+
```
17+
New-CsTeamsShiftsPolicy [-Identity] <XdsIdentity> [-EnableShiftPresence <Boolean>]
18+
[-ShiftNoticeFrequency <String>] [-ShiftNoticeMessageType <String>] [-ShiftNoticeMessageCustom <String>]
19+
[-AccessType <String>] [-AccessGracePeriodMinutes <Int64>] [<CommonParameters>]
20+
```
21+
22+
## DESCRIPTION
23+
This cmdlet allows you to create a TeamsShiftPolicy instance. Use this to also set the policy name, user's shift based presence(EnableShiftPresence) and Teams off shift warning message-specific settings(ShiftNoticeMessageType, ShiftNoticeMessageCustom, ShiftNoticeFrequency, AccessGracePeriodMinutes).
24+
25+
## EXAMPLES
26+
27+
### Example 1
28+
```powershell
29+
PS C:\> New-CsTeamsShiftsPolicy -Identity OffShiftAccessMessage1Always
30+
```
31+
32+
Creates a new instance of TeamsShiftsPolicy called OffShiftAccessMessage1Always and applies the default values to its settings.
33+
34+
### Example 2
35+
```powershell
36+
PS C:\> New-CsTeamsShiftsPolicy -Identity OffShiftAccessMessage1Always -EnableShiftPresence $true -ShiftNoticeFrequency always -ShiftNoticeMessageType Message1 -AccessType UnrestrictedAccess_TeamsApp -AccessGracePeriodMinutes 5
37+
```
38+
39+
Creates a new instance of TeamsShiftsPolicy called OffShiftAccessMessage1Always and applies the provided values to its settings.
40+
41+
## PARAMETERS
42+
43+
### -Identity
44+
Policy instance name.
45+
46+
```yaml
47+
Type: XdsIdentity
48+
Parameter Sets: (All)
49+
Aliases:
50+
Applicable: Microsoft Teams
51+
Required: True
52+
Position: 1
53+
Default value: None
54+
Accept pipeline input: False
55+
Accept wildcard characters: False
56+
```
57+
58+
### -AccessType
59+
Indicates the Teams access type granted to the user. Today, only unrestricted access to Teams app is supported.
60+
Use 'UnrestrictedAccess_TeamsApp' as the value for this setting, or is set by default.
61+
For Teams Off Shift Access Control, the option to show the user a blocking dialog message is supported. Once user accepts this message, it is audit logged and user has usual access to Teams. Set other off shift warning message-specific settings to configure off shift access controls for the user.
62+
63+
```yaml
64+
Type: String
65+
Parameter Sets: (All)
66+
Aliases:
67+
Applicable: Microsoft Teams
68+
Required: False
69+
Position: Named
70+
Default value: UnrestrictedAccess_TeamsApp
71+
Accept pipeline input: False
72+
Accept wildcard characters: False
73+
```
74+
75+
### -EnableShiftPresence
76+
Indicates whether a user is given shift-based presence (On shift, Off shift, or Busy). This must be set in order to have any off shift warning message-specific settings.
77+
78+
```yaml
79+
Type: Boolean
80+
Parameter Sets: (All)
81+
Aliases:
82+
Applicable: Microsoft Teams
83+
Required: False
84+
Position: Named
85+
Default value: False
86+
Accept pipeline input: False
87+
Accept wildcard characters: False
88+
```
89+
90+
### -ShiftNoticeFrequency
91+
Frequency of warning dialog displayed when user opens Teams. Select one of Always, ShowOnceOnChange, Never.
92+
93+
```yaml
94+
Type: String
95+
Parameter Sets: (All)
96+
Aliases:
97+
Applicable: Microsoft Teams
98+
Required: False
99+
Position: Named
100+
Default value: None
101+
Accept pipeline input: False
102+
Accept wildcard characters: False
103+
```
104+
105+
### -ShiftNoticeMessageType
106+
The warning message shown in the blocking dialog when a user access Teams off shift hours. Select one of 7 Microsoft provided messages, a default message or a custom message.
107+
'Message1' - Your employer does not authorize or approve of the use of its network, applications, systems, or tools by non-exempt or hourly employees during their non-working hours. By accepting, you acknowledge that your use of Teams while off shift is not authorized and you will not be compensated.
108+
'Message2' - Accessing this app outside working hours is voluntary. You won't be compensated for time spent on Teams. Refer to your employer's guidelines on using this app outside working hours. By accepting, you acknowledge that you understand the statement above.
109+
'Message3' - You won't be compensated for time using Teams. By accepting, you acknowledge that you understand the statement above.
110+
'Message4' - You're not authorized to use Teams while off shift. By accepting, you acknowledge your use of Teams is against your employer's policy.
111+
'Message5' - Access to Teams is turned off during non-working hours. You will be able to access the app when your next shift starts.
112+
'Message6' - Your employer does not authorize or approve of the use of its network, applications, systems, or tools by non-exempt or hourly employees during their non-working hours. Access to corporate resources are only allowed during approved working hours and should be recorded as hours worked in your employer’s timekeeping system.
113+
'Message7' - Your employer has turned off access to Teams during non-working hours. Refer to your employer's guidelines on using this app outside working hours.
114+
'DefaultMessage' - You aren't authorized to use Microsoft Teams during non-working hours and will only be compensated for using it during approved working hours.
115+
'CustomMessage'
116+
117+
```yaml
118+
Type: String
119+
Parameter Sets: (All)
120+
Aliases:
121+
Applicable: Microsoft Teams
122+
Required: False
123+
Position: Named
124+
Default value: DefaultMessage
125+
Accept pipeline input: False
126+
Accept wildcard characters: False
127+
```
128+
129+
### -ShiftNoticeMessageCustom
130+
Provide a custom message. Must set ShiftNoticeMessageType to 'CustomMessage' to enforce this.
131+
132+
```yaml
133+
Type: String
134+
Parameter Sets: (All)
135+
Aliases:
136+
Applicable: Microsoft Teams
137+
Required: False
138+
Position: Named
139+
Default value: None
140+
Accept pipeline input: False
141+
Accept wildcard characters: False
142+
```
143+
144+
### -AccessGracePeriodMinutes
145+
Indicates the grace period time in minutes between when the first shift starts or last shift ends and when access is blocked.
146+
147+
```yaml
148+
Type: Int64
149+
Parameter Sets: (All)
150+
Aliases:
151+
Applicable: Microsoft Teams
152+
Required: False
153+
Position: Named
154+
Default value: None
155+
Accept pipeline input: False
156+
Accept wildcard characters: False
157+
```
158+
159+
### CommonParameters
160+
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).
161+
162+
## INPUTS
163+
164+
### None
165+
166+
## OUTPUTS
167+
168+
### System.Object
169+
## NOTES
170+
171+
## RELATED LINKS
172+
173+
[Get-CsTeamsShiftsPolicy](Get-CsTeamsShiftsPolicy.md)
174+
175+
[Set-CsTeamsShiftsPolicy](New-CsTeamsShiftsPolicy.md)
176+
177+
[Remove-CsTeamsShiftsPolicy](Remove-CsTeamsShiftsPolicy.md)
178+
179+
[Grant-CsTeamsShiftsPolicy](Grant-CsTeamsShiftsPolicy.md)

0 commit comments

Comments
 (0)