Editar

Compartir a través de


New-CsTeamsShiftsPolicy

This cmdlet allows you to create a new TeamsShiftPolicy instance and set it's properties.

Syntax

New-CsTeamsShiftsPolicy
   [-ShiftNoticeFrequency <String>]
   [-ShiftNoticeMessageType <String>]
   [-ShiftNoticeMessageCustom <String>]
   [-AccessType <String>]
   [-AccessGracePeriodMinutes <Int64>]
   [-EnableScheduleOwnerPermissions <Boolean>]
   [-Identity] <String>
   [-Force]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

This cmdlet allows you to create a TeamsShiftPolicy instance. Use this to also set the policy name, schedule owner permissions, and Teams off shift warning message-specific settings (ShiftNoticeMessageType, ShiftNoticeMessageCustom, ShiftNoticeFrequency, AccessGracePeriodMinutes).

Examples

Example 1

PS C:\> New-CsTeamsShiftsPolicy -Identity OffShiftAccessMessage1Always

Creates a new instance of TeamsShiftsPolicy called OffShiftAccessMessage1Always and applies the default values to its settings.

Example 2

PS C:\> New-CsTeamsShiftsPolicy -Identity OffShiftAccessMessage1Always -ShiftNoticeFrequency always -ShiftNoticeMessageType Message1 -AccessType UnrestrictedAccess_TeamsApp -AccessGracePeriodMinutes 5 -EnableScheduleOwnerPermissions $false

Creates a new instance of TeamsShiftsPolicy called OffShiftAccessMessage1Always and applies the provided values to its settings.

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
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableScheduleOwnerPermissions

Indicates whether a user can manage a Shifts schedule as a team member.

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

-Force

Suppresses the display of any non-fatal error message that might arise when running the command.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Identity

Policy instance name.

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

-ShiftNoticeFrequency

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

Type:String
Position:Named
Default value:None
Required:False
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
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object