|
| 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