New-CsOnlineSchedule

 

Topic Last Modified: 2017-02-24

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

New-CsOnlineSchedule -Name <String> -WeeklyRecurrentSchedule <SwitchParameter>  [-Complement <SwitchParameter>]  [-SundayHours <List>] [-MondayHours <List>] [-TuesdayHours <List>] [-WednesdayHours <List>] [-ThursdayHours <List>] [-FridayHours <List>] [-SaturdayHours <List>]   

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

$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 an after-hours schedule that is active at all times except Monday- Friday, 9am-12pm and 1pm-5pm.

$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


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.

NoteNote:
  • 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.

 

Parameter Required Type Description

Name

Required

System.String

The Name parameter is the friendly name for the schedule.

WeeklyRecurrentSchedule

Required

System.Management.Automation.SwitchParameter

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

Complement

Optional

System.Management.Automation.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.

SundayHours

Optional

System.Collections.Generic.List

List of time ranges for that day.

MondayHours

Optional

System.Collections.Generic.List

List of time ranges for that day.

TuesdayHours

Optional

System.Collections.Generic.List

List of time ranges for that day.

WednesdayHours

Optional

System.Collections.Generic.List

List of time ranges for that day.

ThursdayHours

Optional

System.Collections.Generic.List

List of time ranges for that day.

FridayHours

Optional

System.Collections.Generic.List

List of time ranges for that day.

SaturdayHours

Optional

System.Collections.Generic.List

List of time ranges for that day.

The New-CsOnlineSchedule cmdlet creates new instances of the Microsoft.Rtc.Management.Hosted.Online.Models.Schedule object.

 
Show: