Commands › Microsoft Teams

Set-CsTeamsTranslationRule

Microsoft Teams MicrosoftTeams Set-*

Cmdlet to modify an existing normalization rule.

Quick start script

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

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

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

Syntax

Set-CsTeamsTranslationRule [[-Identity] <string>] [-Description <string>] [-Pattern <string>] [-Translation <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (6)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String A friendly description of the normalization rule.
-Identity String Identifier of the rule. This parameter is required and later used to assign the rule to the Inbound or Outbound Trunk Normalization policy.
-Pattern String A regular expression that caller or callee number must match in order for this rule to be applied.
-Translation String The regular expression pattern that will be applied to the number to convert it.
-WhatIf SwitchParameter Describes what would happen if you executed the command without actually executing the command. The cmdlet is not run.

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