Commands › Microsoft Teams

New-CsOnlineSchedule

Microsoft Teams MicrosoftTeams New-*

Create a new schedule.

Quick start script

# New-CsOnlineSchedule — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsOnlineSchedule
$before | Format-List

# 3. Make the change
New-CsOnlineSchedule -FixedSchedule <SwitchParameter> -Name <String> -WeeklyRecurrentSchedule <SwitchParameter>

# 4. Verify and diff
$after = Get-CsOnlineSchedule
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

WeeklyRecurrentSchedule

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

FixedSchedule

New-CsOnlineSchedule -Name <String> -FixedSchedule [-DateTimeRanges <List>] [-Tenant <Guid>] [<CommonParameters>]

Parameters (13)

ParameterTypeRequiredWhat it controls
-Complement 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...
-DateTimeRanges List List of date-time ranges for a fixed schedule. At most, 10 date-time ranges can be specified using this parameter.
-FixedSchedule SwitchParameter yes The FixedSchedule parameter indicates that a fixed schedule is to be created.
-FridayHours List List of time ranges for that day.
-MondayHours List List of time ranges for that day.
-Name String yes The Name parameter represents a unique friendly name for the schedule.
-SaturdayHours List List of time ranges for that day.
-SundayHours List List of time ranges for that day.
-Tenant Guid This parameter is reserved for Microsoft internal use only.
-ThursdayHours List List of time ranges for that day.
-TuesdayHours List List of time ranges for that day.
-WednesdayHours List List of time ranges for that day.
-WeeklyRecurrentSchedule SwitchParameter yes The WeeklyRecurrentSchedule parameter indicates that a weekly recurrent schedule is to be created. This parameter is mandatory when a weekly recurrent schedule is to be created.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.