Commands › Microsoft Teams

Remove-CsHybridTelephoneNumber

Microsoft Teams MicrosoftTeams Remove-*

This cmdlet removes a hybrid telephone number.

Quick start script

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

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

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

Syntax — 2 parameter sets

Remove (Default)

Remove-CsHybridTelephoneNumber -TelephoneNumber <String> [-Break] [-HttpPipelineAppend <SendAsyncStep[]>]
 [-HttpPipelinePrepend <SendAsyncStep[]>] [-PassThru] [-Proxy <Uri>] [-ProxyCredential <PSCredential>]
 [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]

RemoveViaIdentity

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

Parameters (11)

ParameterTypeRequiredWhat it controls
-Break SwitchParameter {{ Fill Break Description }}
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-HttpPipelineAppend SendAsyncStep[] {{ Fill HttpPipelineAppend Description }}
-HttpPipelinePrepend SendAsyncStep[] {{ Fill HttpPipelinePrepend Description }}
-InputObject IConfigApiBasedCmdletsIdentity yes {{ Fill InputObject Description }}
-PassThru SwitchParameter {{ Fill PassThru Description }}
-Proxy Uri {{ Fill Proxy Description }}
-ProxyCredential PSCredential {{ Fill ProxyCredential Description }}
-ProxyUseDefaultCredentials SwitchParameter {{ Fill ProxyUseDefaultCredentials Description }}
-TelephoneNumber String yes The telephone number to remove. The number should be specified without a prefixed "+". The phone number can't have "tel:" prefixed.
-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.