New-CsTeamsTranslationRule
Cmdlet to create a new telephone number manipulation rule.
Syntax
New-CsTeamsTranslationRule
[-Identity] <string>
[-Description <string>]
[-Pattern <string>]
[-Translation <string>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-CsTeamsTranslationRule
-Name <string>
[-Description <string>]
[-Pattern <string>]
[-Translation <string>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
You can use this cmdlet to create a new number manipulation rule. The rule can be used, for example, in the settings of your SBC (Set-CSOnlinePSTNGateway) to convert a callee or caller number to a desired format before entering or leaving Microsoft Phone System
Examples
Example 1
New-CsTeamsTranslationRule -Identity 'AddPlus1' -Pattern '^(\d{10})$' -Translation '+1$1'
This example creates a rule that adds +1 to any ten digits number. For example, 2065555555 will be translated to +1206555555
Example 2
New-CsTeamsTranslationRule -Identity 'StripPlus1' -Pattern '^\+1(\d{10})$' -Translation '$1'
This example creates a rule that strips +1 from any E.164 eleven digits number. For example, +12065555555 will be translated to 206555555
Example 3
New-CsTeamsTranslationRule -Identity 'AddE164SeattleAreaCode' -Pattern '^(\d{4})$' -Translation '+120655$1'
This example creates a rule that adds +1206555 to any four digits number (converts it to E.164number). For example, 5555 will be translated to +1206555555
Example 4
New-CsTeamsTranslationRule -Identity 'AddSeattleAreaCode' -Pattern '^(\d{4})$' -Translation '425555$1'
This example creates a rule that adds 425555 to any four digits number (converts to non-E.164 ten digits number). For example, 5555 will be translated to 4255555555
Example 5
New-CsTeamsTranslationRule -Identity 'StripE164SeattleAreaCode' -Pattern '^\+1206555(\d{4})$' -Translation '$1'
This example creates a rule that strips +1206555 from any E.164 ten digits number. For example, +12065555555 will be translated to 5555
Parameters
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
A friendly description of the normalization rule.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The Identifier of the rule. This parameter is required and later used to assign the rule to the Inbound or Outbound Trunk Normalization policy.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The name of the rule.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
A regular expression that caller or callee number must match in order for this rule to be applied.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The regular expression pattern that will be applied to the number to convert it.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Describes what would happen if you executed the command without actually executing the command. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Related Links
フィードバック
フィードバックの送信と表示