Commands › Microsoft Teams

New-CsTeamsTranslationRule

Microsoft Teams MicrosoftTeams New-*

Cmdlet to create a new telephone number manipulation rule.

Quick start script

# New-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)
New-CsTeamsTranslationRule -Identity <String> -Name <String> -WhatIf
New-CsTeamsTranslationRule -Identity <String> -Name <String>

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

Syntax — 2 parameter sets

Identity (Default)

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

ParentAndRelativeKey

New-CsTeamsTranslationRule -Name <string> [-Description <string>] [-Pattern <string>] [-Translation <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (7)

ParameterTypeRequiredWhat it controls
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-Description String A friendly description of the normalization rule.
-Identity String yes The Identifier of the rule. This parameter is required and later used to assign the rule to the Inbound or Outbound Trunk Normalization policy.
-Name String yes The name of the rule.
-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.