Edit

Share via


Set-CsOnlineSchedule

Use the Set-CsOnlineSchedule cmdlet to update a schedule.

Syntax

Default (Default)

Set-CsOnlineSchedule
    -Instance <Object>
    [-Tenant <Guid>]
    [<CommonParameters>]

Description

The Set-CsOnlineSchedule cmdlet lets you modify the properties of a schedule.

Examples

Example 1

$schedule = Get-CsOnlineSchedule -Id "fa9081d6-b4f3-5c96-baec-0b00077709e5"
$schedule.Name = "Christmas Holiday"
Set-CsOnlineSchedule -Instance $schedule

This example modifies the name of the schedule that has a Id of fa9081d6-b4f3-5c96-baec-0b00077709e5.

Example 2

$schedule = Get-CsOnlineSchedule -Id "fa9081d6-b4f3-5c96-baec-0b00077709e5"

$schedule

        Id                      : 5d3e0315-533b-473d-8524-36c954d1fc93
        Name                    : Thanksgiving
        Type                    : Fixed
        WeeklyRecurrentSchedule :
        FixedSchedule           : 22/11/2018 00:00 - 23/11/2018 00:00, 28/11/2019 00:00 - 29/11/2019 00:00, 26/11/2020 00:00 - 27/11/2020 00:00

# Add a new Date Time Range
$schedule.FixedSchedule.DateTimeRanges += New-CsOnlineDateTimeRange -Start "25/11/2021" -End "26/11/2021"

Set-CsOnlineSchedule -Instance $schedule

This example updates an existing holiday schedule, adding a new date/time range to it.

Parameters

-Instance

Applicable: Microsoft Teams

The Instance parameter is the object reference to the schedule to be modified.

Parameter properties

Type:Object
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Tenant

Applicable: Microsoft Teams

Parameter properties

Type:System.Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

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

The modified instance of the Microsoft.Rtc.Management.Hosted.Online.Models.Schedule object.

Outputs

System.Void