Commands › Microsoft Teams

Set-CsPhoneNumberTenantConfiguration

Microsoft Teams MicrosoftTeams Set-*

This cmdlet allows the admins to set a tenant default configuration that applies to all telephone numbers within the tenant.

Quick start script

# Set-CsPhoneNumberTenantConfiguration — 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-CsPhoneNumberTenantConfiguration
$before | Format-List

# 3. Make the change
Set-CsPhoneNumberTenantConfiguration

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

Syntax

Set-CsPhoneNumberTenantConfiguration [-AssignmentEmailEnabled <bool>] [-UnassignmentEmailEnabled <bool>] [-AssignmentBlockedForever <bool>] [-AssignmentBlockedDays <Integer>] [-AllowOnPremToOnlineMigration <bool>]
[<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-AssignmentEmailEnabled Boolean Enables email notifications for all telephone number assignment operations.
-UnassignmentEmailEnabled Boolean Enables email notifications for all telephone number unassignment operations.
-AssignmentBlockedForever Boolean Sets an indefinite block on assignment for all the telephone numbers upon unassignment.
-AssignmentBlockedDays Int32 Sets a duration based assignment block on all the telephone numbers upon unassignment.
-AllowOnPremToOnlineMigration Boolean Allows Direct Routing numbers to be migrated from OnPremises to Online automatically.

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