Commands › Microsoft Teams

Remove-CsTeamsShiftsScheduleRecord

Microsoft Teams MicrosoftTeams Remove-*

This cmdlet enqueues the clear schedule message.

Quick start script

# Remove-CsTeamsShiftsScheduleRecord — 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-CsTeamsShiftsScheduleRecord
$before | Format-List

# 3. Make the change (dry run first)
Remove-CsTeamsShiftsScheduleRecord -Body <IClearScheduleRequest> -ClearSchedulingGroup <SwitchParameter> -EntityType <String[]> -WhatIf
Remove-CsTeamsShiftsScheduleRecord -Body <IClearScheduleRequest> -ClearSchedulingGroup <SwitchParameter> -EntityType <String[]>

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

Syntax — 2 parameter sets

RemoveExpanded (Default)

Remove-CsTeamsShiftsScheduleRecord [-ClearSchedulingGroup] -EntityType <String[]> -TeamId <String>
 [-DateRangeEndDate <DateTime>] [-DateRangeStartDate <DateTime>] [-DesignatedActorId <String>]
 [-TimeZone <String>] [-Break] [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>]
 [-PassThru] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [-WhatIf]
 [-Confirm] [<CommonParameters>]

Remove

Remove-CsTeamsShiftsScheduleRecord -Body <IClearScheduleRequest> [-Break]
 [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-PassThru] [-Proxy <Uri>]
 [-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (17)

ParameterTypeRequiredWhat it controls
-Body IClearScheduleRequest yes The request body.
-Break SwitchParameter Wait for .NET debugger to attach.
-ClearSchedulingGroup SwitchParameter yes A value indicating whether to clear schedule group.
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-DateRangeEndDate String The end date of removing schedule record.
-DateRangeStartDate String The start date of removing schedule record.
-DesignatedActorId String The user ID of designated actor.
-EntityType String[] yes The entity types.
-HttpPipelineAppend SendAsyncStep[] SendAsync Pipeline Steps to be appended to the front of the pipeline
-HttpPipelinePrepend SendAsyncStep[] SendAsync Pipeline Steps to be prepended to the front of the pipeline
-PassThru SwitchParameter Used to return an object that represents the item being modified.
-Proxy Uri The URI for the proxy server to use
-ProxyCredential PSCredential Credentials for a proxy server to use for the remote call.
-ProxyUseDefaultCredentials SwitchParameter Use the default credentials for the proxy.
-TeamId String yes The Teams team ID where you want to remove schedule record.
-TimeZone String The Timezone parameter ensures that the shifts are displayed in the correct time zone based on your team's location.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

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