|
| 1 | +--- |
| 2 | +external help file: Microsoft.Rtc.Management.Hosted.dll-help.xml |
| 3 | +applicable: Skype for Business Online |
| 4 | +title: New-CsTeamsTranslationRule |
| 5 | +schema: 2.0.0 |
| 6 | +manager: nmurav |
| 7 | +author: filippse |
| 8 | +ms.author: filippse |
| 9 | +ms.reviewer: |
| 10 | +--- |
| 11 | + |
| 12 | +# New-CsTeamsTranslationRule |
| 13 | + |
| 14 | +## SYNOPSIS |
| 15 | +Cmdlet to create a new telephone number manipulation rule. |
| 16 | + |
| 17 | +## SYNTAX |
| 18 | + |
| 19 | +``` |
| 20 | +New-CsTeamsTranslationRule [-Identity <string>] [-Tenant <guid>] [-Description <string>] [-Pattern <string>] [-Translation <string>] [-InMemory] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>] |
| 21 | +``` |
| 22 | + |
| 23 | +## DESCRIPTION |
| 24 | +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 |
| 25 | + |
| 26 | +## EXAMPLES |
| 27 | + |
| 28 | +### Example 1 |
| 29 | +```powershell |
| 30 | +PS C:\> New-CsTeamsTranslationRule -Identity AddPlus1 -Pattern ^(\d{10})$ -Translation +$1 |
| 31 | +``` |
| 32 | + |
| 33 | +This example creates a rule that adds +1 to any ten digits number. For example, 2065555555 will be translated to +1206555555 |
| 34 | + |
| 35 | +### Example 2 |
| 36 | +```powershell |
| 37 | +PS C:\> New-CsTeamsTranslationRule -Identity StripPlus1 -Pattern ^+1(\d{10})$ -Translation $1 |
| 38 | +``` |
| 39 | + |
| 40 | +This example creates a rule that strips +1 from any E.164 eleven digits number. For example, +12065555555 will be translated to 206555555 |
| 41 | + |
| 42 | +### Example 3 |
| 43 | +```powershell |
| 44 | +PS C:\> New-CsTeamsTranslationRule -Identity AddE164SeattleAreaCode -Pattern ^(\d{4})$ -Translation +120655$1 |
| 45 | +``` |
| 46 | + |
| 47 | +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 |
| 48 | + |
| 49 | +### Example 4 |
| 50 | +```powershell |
| 51 | +PS C:\> New-CsTeamsTranslationRule -Identity AddSeattleAreaCode -Pattern ^(\d{4})$ -Translation 425555$1 |
| 52 | +``` |
| 53 | + |
| 54 | +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 |
| 55 | + |
| 56 | +### Example 5 |
| 57 | +```powershell |
| 58 | +PS C:\> New-CsTeamsTranslationRule -Identity StripE164SeattleAreaCode -Pattern ^+1206555(\d{4})$ -Translation $1 |
| 59 | +``` |
| 60 | + |
| 61 | +This example creates a rule that strips +1206555 from any E.164 ten digits number. For example, +12065555555 will be translated to 5555 |
| 62 | + |
| 63 | + |
| 64 | +## PARAMETERS |
| 65 | + |
| 66 | +### -Confirm |
| 67 | +Prompts you for confirmation before running the cmdlet. |
| 68 | + |
| 69 | +```yaml |
| 70 | +Type: SwitchParameter |
| 71 | +Parameter Sets: (All) |
| 72 | +Aliases: cf |
| 73 | +Required: False |
| 74 | +Position: Named |
| 75 | +Default value: None |
| 76 | +Accept pipeline input: False |
| 77 | +Accept wildcard characters: False |
| 78 | +``` |
| 79 | +
|
| 80 | +### -Description |
| 81 | +A friendly description of the normalization rule. |
| 82 | +
|
| 83 | +```yaml |
| 84 | +Type: Object |
| 85 | +Parameter Sets: (All) |
| 86 | +Aliases: |
| 87 | +Required: False |
| 88 | +Position: Named |
| 89 | +Default value: None |
| 90 | +Accept pipeline input: False |
| 91 | +Accept wildcard characters: False |
| 92 | +``` |
| 93 | +
|
| 94 | +### -Force |
| 95 | +Suppresses any confirmation prompts that would otherwise be displayed before making changes and suppresses the display of any non-fatal error message that might arise when running the command. |
| 96 | +
|
| 97 | +```yaml |
| 98 | +Type: SwitchParameter |
| 99 | +Parameter Sets: (All) |
| 100 | +Aliases: |
| 101 | +Required: False |
| 102 | +Position: Named |
| 103 | +Default value: None |
| 104 | +Accept pipeline input: False |
| 105 | +Accept wildcard characters: False |
| 106 | +``` |
| 107 | +
|
| 108 | +### -Identity |
| 109 | +Identifier of the rule. This parameter is required and later used to assign the rule to Inbound or Outbound Trunk Normalization policy. |
| 110 | +
|
| 111 | +```yaml |
| 112 | +Type: Object |
| 113 | +Parameter Sets: (All) |
| 114 | +Aliases: |
| 115 | +Required: False |
| 116 | +Position: 1 |
| 117 | +Default value: None |
| 118 | +Accept pipeline input: False |
| 119 | +Accept wildcard characters: False |
| 120 | +``` |
| 121 | +
|
| 122 | +### -InMemory |
| 123 | +Creates an object reference without actually committing the object as a permanent change. If you assign the output of this cmdlet called with this parameter to a variable, you can make changes to the properties of the object reference and then commit those changes by calling this cmdlet's matching Set-<cmdlet>. |
| 124 | +
|
| 125 | +```yaml |
| 126 | +Type: SwitchParameter |
| 127 | +Parameter Sets: (All) |
| 128 | +Aliases: |
| 129 | +Required: False |
| 130 | +Position: Named |
| 131 | +Default value: None |
| 132 | +Accept pipeline input: False |
| 133 | +Accept wildcard characters: False |
| 134 | +``` |
| 135 | +
|
| 136 | +### -Pattern |
| 137 | +A regular expression that caller or callee number must match in order for this rule to be applied. |
| 138 | +
|
| 139 | +```yaml |
| 140 | +Type: Object |
| 141 | +Parameter Sets: (All) |
| 142 | +Aliases: |
| 143 | +Required: False |
| 144 | +Position: Named |
| 145 | +Default value: None |
| 146 | +Accept pipeline input: False |
| 147 | +Accept wildcard characters: False |
| 148 | +``` |
| 149 | +
|
| 150 | +### -Tenant |
| 151 | +Globally unique identifier (GUID) of the tenant account whose number manipulation rule is being created. |
| 152 | +
|
| 153 | +```yaml |
| 154 | +Type: Object |
| 155 | +Parameter Sets: (All) |
| 156 | +Aliases: |
| 157 | +Required: False |
| 158 | +Position: Named |
| 159 | +Default value: None |
| 160 | +Accept pipeline input: False |
| 161 | +Accept wildcard characters: False |
| 162 | +``` |
| 163 | +
|
| 164 | +### -Translation |
| 165 | +The regular expression pattern that will be applied to the number to convert it. |
| 166 | +
|
| 167 | +```yaml |
| 168 | +Type: Object |
| 169 | +Parameter Sets: (All) |
| 170 | +Aliases: |
| 171 | +Required: False |
| 172 | +Position: Named |
| 173 | +Default value: None |
| 174 | +Accept pipeline input: False |
| 175 | +Accept wildcard characters: False |
| 176 | +``` |
| 177 | +
|
| 178 | +### -WhatIf |
| 179 | +Describes what would happen if you executed the command without actually executing the command. The cmdlet is not run. |
| 180 | +
|
| 181 | +```yaml |
| 182 | +Type: SwitchParameter |
| 183 | +Parameter Sets: (All) |
| 184 | +Aliases: wi |
| 185 | +Required: False |
| 186 | +Position: Named |
| 187 | +Default value: None |
| 188 | +Accept pipeline input: False |
| 189 | +Accept wildcard characters: False |
| 190 | +``` |
| 191 | +### CommonParameters |
| 192 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. |
| 193 | +For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216). |
| 194 | +
|
| 195 | +## INPUTS |
| 196 | +
|
| 197 | +## OUTPUTS |
| 198 | +
|
| 199 | +## NOTES |
| 200 | +
|
| 201 | +## RELATED LINKS |
0 commit comments