New-CsOnlineSchedule

Use the New-CsOnlineSchedule cmdlet to create a new schedule.

Syntax

New-CsOnlineSchedule
   [-Name <Object>]
   [-WeeklyRecurrentSchedule]
   [-BypassDualWrite <Object>]
   [-Complement]
   [-DomainController <Object>]
   [-Force]
   [-FridayHours <Object>]
   [-MondayHours <Object>]
   [-SaturdayHours <Object>]
   [-SundayHours <Object>]
   [-Tenant <Object>]
   [-ThursdayHours <Object>]
   [-TuesdayHours <Object>]
   [-WednesdayHours <Object>]
   [-AsJob]
   [-DateTimeRanges <Object>]
   [-FixedSchedule]
   [<CommonParameters>]

Description

The New-CsOnlineSchedule cmdlet creates a new schedule for the Organizational Auto Attendant (OAA) service. The OAA service uses schedules to conditionally execute call flows when a specific schedule is in effect.

Note: The type of the schedule cannot be altered after the schedule is created. For a weekly recurrent schedule, at least one day should have time ranges specified. You can create a new time range by using New-CsOnlineTimeRange cmdlet. The return type of this cmdlet composes a member for the underlying type/implementation. For example, in case of the weekly recurrent schedule, you can modify Monday’s time ranges through the Schedule.WeeklyRecurrentSchedule.MondayHours property.

Examples

-------------------------- Example 1 --------------------------

$tr1 = New-CsOnlineTimeRange -Start 09:00 -End 12:00
$tr2 = New-CsOnlineTimeRange -Start 13:00 -End 17:00
$businessHours = New-CsOnlineSchedule -Name "Business Hours" -WeeklyRecurrentSchedule -MondayHours @($tr1, $tr2) -TuesdayHours @($tr1, $tr2) -WednesdayHours @($tr1, $tr2) -ThursdayHours @($tr1, $tr2) -FridayHours @($tr1, $tr2)

This example creates a schedule that sets business hours (Monday- Friday, 9am-12pm and 1pm-5pm).

-------------------------- Example 2 --------------------------

$tr1 = New-CsOnlineTimeRange -Start 09:00 -End 12:00
$tr2 = New-CsOnlineTimeRange -Start 13:00 -End 17:00
$afterHours = New-CsOnlineSchedule -Name " After Hours" -WeeklyRecurrentSchedule -MondayHours @($tr1, $tr2) -TuesdayHours @($tr1, $tr2) -WednesdayHours @($tr1, $tr2) -ThursdayHours @($tr1, $tr2) -FridayHours @($tr1, $tr2) -Complement

This example creates an after-hours schedule that is active at all times except Monday- Friday, 9am-12pm and 1pm-5pm.

Required Parameters

-FixedSchedule

{{Fill FixedSchedule Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Name

PARAMVALUE: String

The Name parameter is the friendly name for the schedule.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-WeeklyRecurrentSchedule

PARAMVALUE: SwitchParameter

The WeeklyRecurrentSchedule parameter indicates that a weekly recurrent schedule is to be created.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online

Optional Parameters

-AsJob

{{Fill AsJob Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-BypassDualWrite

PARAMVALUE: $true | $false

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Complement

PARAMVALUE: SwitchParameter

The Complement parameter indicates how the schedule is used. When Complement is enabled, the schedule is used as the inverse of the provided configuration. For example, if Complement is enabled and the schedule only contains time ranges of Monday to Friday from 9am to 5pm, then the schedule is active at all times other than the specified time ranges.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-DateTimeRanges

{{Fill DateTimeRanges Description}}

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-DomainController

PARAMVALUE: Fqdn

Type:Object
Aliases:DC
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Force

PARAMVALUE: SwitchParameter

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-FridayHours

PARAMVALUE: List

List of time ranges for that day.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-MondayHours

PARAMVALUE: List

List of time ranges for that day.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-SaturdayHours

PARAMVALUE: List

List of time ranges for that day.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-SundayHours

PARAMVALUE: List

List of time ranges for that day.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Tenant

PARAMVALUE: Guid

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-ThursdayHours

PARAMVALUE: List

List of time ranges for that day.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-TuesdayHours

PARAMVALUE: List

List of time ranges for that day.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-WednesdayHours

PARAMVALUE: List

List of time ranges for that day.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online

Inputs

None

Outputs

Microsoft.Rtc.Management.Hosted.Online.Models.Schedule