Commands › Microsoft Teams

Remove-CsTeamTemplate

Microsoft Teams MicrosoftTeams Remove-*

This cmdlet deletes a specified Team Template from Microsoft Teams.

Quick start script

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

# 3. Make the change (dry run first)
Remove-CsTeamTemplate -InputObject <IConfigApiBasedCmdletsIdentity> -OdataId <String> -WhatIf
Remove-CsTeamTemplate -InputObject <IConfigApiBasedCmdletsIdentity> -OdataId <String>

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

Syntax — 2 parameter sets

Delete (Default)

Remove-CsTeamTemplate -OdataId <String> [-Break] [-HttpPipelineAppend <SendAsyncStep[]>]
 [-HttpPipelinePrepend <SendAsyncStep[]>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>]
 [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]

DeleteViaIdentity

Remove-CsTeamTemplate -InputObject <IConfigApiBasedCmdletsIdentity> [-Break]
 [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-Proxy <Uri>]
 [-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (10)

ParameterTypeRequiredWhat it controls
-Break SwitchParameter Wait for .NET debugger to attach
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-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
-InputObject IConfigApiBasedCmdletsIdentity yes Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
-OdataId String yes A composite URI of a template.
-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
-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.