Set-CsTeamsShiftsPolicy

This cmdlet allows you to set or update properties of a TeamsShiftPolicy instance, including user's shift based presence and Teams off shift warning message-specific settings.

Syntax

Set-CsTeamsShiftsPolicy
   [[-Identity] <XdsIdentity>]
   [-EnableShiftPresence <Boolean>]
   [-ShiftNoticeFrequency <String>]
   [-ShiftNoticeMessageType <String>]
   [-ShiftNoticeMessageCustom <String>]
   [-AccessType <String>]
   [-AccessGracePeriodMinutes <Int64>]
   [<CommonParameters>]

Description

This cmdlet allows you to set or update properties of a TeamsShiftPolicy instance. Use this to set the policy name, user's shift based presence (EnableShiftPresence) and Teams off shift warning message-specific settings (ShiftNoticeMessageType, ShiftNoticeMessageCustom, ShiftNoticeFrequency, AccessGracePeriodMinutes).

Examples

Example 1

PS C:\> Set-CsTeamsShiftsPolicy -Identity OffShiftAccess_WarningMessage1_AlwaysShowMessage -EnableShiftPresence $true -ShiftNoticeMessageType Message1 -ShiftNoticeFrequency always -AccessGracePeriodMinutes 5

In this example, the policy instance is called "OffShiftAccess_WarningMessage1_AlwaysShowMessage", Shift based presence is enabled (On Shift, Off Shift), a warning message (Message 1) will be always be displayed to the user on opening Teams during off shift hours.

Parameters

-AccessGracePeriodMinutes

Indicates the grace period time in minutes between when the first shift starts, or last shift ends and when access is blocked.

Type:Int64
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-AccessType

Indicates the Teams access type granted to the user. Today, only unrestricted access to Teams app is supported. Use 'UnrestrictedAccess_TeamsApp' as the value for this setting, or is set by default. For Teams Off Shift Access Control, the option to show the user a blocking dialog message is supported. Once the user accepts this message, it is audit logged and the user has usual access to Teams. Set other off shift warning message-specific settings to configure off shift access controls for the user.

Type:String
Position:Named
Default value:UnrestrictedAccess_TeamsApp
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-EnableShiftPresence

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.

Type:Boolean
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-Identity

Policy instance name.

Type:XdsIdentity
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-ShiftNoticeFrequency

Frequency of warning dialog displayed when user opens Teams. Set one of Always, ShowOnceOnChange, Never.

Type:String
Position:Named
Default value:Always
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-ShiftNoticeMessageCustom

Provide a custom message. Must set ShiftNoticeMessageType to 'CustomMessage' to enforce this.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-ShiftNoticeMessageType

The warning message is 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. '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. '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. 'Message3' - You won't be compensated for time using Teams. By accepting, you acknowledge that you understand the statement above. '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. 'Message5' - Access to Teams is turned off during non-working hours. You will be able to access the app when your next shift starts. '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. '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. '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. 'CustomMessage'

Type:String
Position:Named
Default value:DefaultMessage
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

Inputs

System.Management.Automation.PSObject

Outputs

System.Object