Commands › Microsoft Teams

Set-CsInboundBlockedNumberPattern

Microsoft Teams MicrosoftTeams Set-*

Modifies one or more parameters of a blocked number pattern in the tenant list.

Quick start script

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

# 3. Make the change (dry run first)
Set-CsInboundBlockedNumberPattern  -WhatIf
Set-CsInboundBlockedNumberPattern

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

Syntax

Set-CsInboundBlockedNumberPattern [[-Identity] <string>] [-Description <string>] [-Enabled <boolean>] [-Pattern <string>] [-ResourceAccount <guid>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String A friendly description for the blocked number pattern to be modified.
-Enabled Boolean If this parameter is set to True, the inbound calls matching the pattern will be blocked.
-Identity String A unique identifier specifying the blocked number pattern to be modified.
-Pattern String A regular expression that the calling number must match in order to be blocked.
-ResourceAccount Guid The GUID of a resource account to redirect calls to when the pattern matches. If specified, matched calls will be redirected to this resource account instead of being blocked.
-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.