Topic Last Modified: 2010-10-01

Modifies a voice normalization rule. Voice normalization rules are used to convert a telephone dialing requirement (for example, dialing 9 to access an outside line) to the E.164 phone number format used by Microsoft Lync Server 2010.


Set-CsVoiceNormalizationRule [-Identity <XdsIdentity>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-IsInternalExtension <$true | $false>] [-Pattern <String>] [-Priority <Int32>] [-Translation <String>] [-WhatIf [<SwitchParameter>]]
Set-CsVoiceNormalizationRule [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-Instance <PSObject>] [-IsInternalExtension <$true | $false>] [-Pattern <String>] [-Priority <Int32>] [-Translation <String>] [-WhatIf [<SwitchParameter>]]


Parameter Required Type Description




A unique identifier for the rule. The Identity specified must include the scope followed by a slash followed by the name; for example: site:Redmond/Rule1, where site:Redmond is the scope and Rule1 is the name.




Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values. This object must be of type NormalizationRule and can be retrieved by calling Get-CsVoiceNormalizationRule




A friendly description of the normalization rule.

Maximum string length: 512 characters.




If True, the result of applying this rule will be a number internal to the enterprise. If False, applying the rule results in an external number. This value is ignored if the value of the OptimizeDeviceDialing property of the associated dial plan is set to False.




The order in which rules are applied. A number might match more than one rule. This parameter sets the order in which the rules are tested against the number.




A regular expression that the dialed number must match in order for this rule to be applied.




The regular expression pattern that will be applied to the number to convert it to E.164 format.




Suppresses any confirmation prompts that would otherwise be displayed before making changes.




Describes what would happen if you executed the command without actually executing the command.




Prompts you for confirmation before executing the command.

Detailed Description

This cmdlet modifies a named voice normalization rule. These rules are a required part of phone authorization and call routing. They define the requirements for converting (or translating) numbers from an internal Lync Server 2010 format to a standard (E.164) format. An understanding of regular expressions is helpful in order to define number patterns that will be translated.

Rules that are modified by using this cmdlet are part of the dial plan and, in addition to being accessible through the Get-CsVoiceNormalizationRule cmdlet, can also be accessed through the NormalizationRules property returned by a call to the Get-CsDialPlan cmdlet.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsVoiceNormalizationRule cmdlet locally: RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Set-CsVoiceNormalizationRule"}

Input Types

Microsoft.Rtc.Management.WritableConfig.Policy.Voice.NormalizationRule object. Accepts pipelined input of voice normalization rule objects.

Return Types

Set-CsVoiceNormalizationRule does not return a value or object. Instead, the cmdlet configures instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.NormalizationRule object.


-------------------------- Example 1 --------------------------

Copy Code
Set-CsVoiceNormalizationRule -Identity "site:Redmond/Prefix Redmond" -Description "Add a prefix to all numbers on site Redmond"

This example sets the description of the rule Prefix Redmond on site Redmond to "Add a prefix to all numbers on site Redmond".

-------------------------- Example 2 --------------------------

Copy Code
Set-CsVoiceNormalizationRule -Identity global/SeattleFourDigit -Description "Translate an internal four-digit extension" -Translation '+1206556$1'

This example modifies the voice normalization rule with the Identity global/SeattleFourDigit. A new Description has been specified to reflect the modifications to the rule. In addition, a Translation value has been specified that modifies the rule to translate any number matching the existing pattern of this rule to the same number but with the prefix +1206556. For example, if the existing pattern matched any four-digit number and the number 1234 were entered, this rule would translate that extension to the number +12065561234.

-------------------------- Example 3 --------------------------

Copy Code
$a = Get-CsVoiceNormalizationRule -Identity global/RedmondFourDigit
$ = "RedmondRule"
Set-CsVoiceNormalizationRule -Instance $a

Example 3 changes the name of the normalization rule. Keep in mind that changing the name also changes the name portion of the Identity. The Set-CsVoiceNormalizationRule cmdlet doesn’t have a Name parameter, so in order to change the name we first call Get-CsVoiceNormalizationRule to retrieve the rule with the Identity global/RedmondFourDigit and assign the returned object to the variable $a. We then assign the string RedmondRule to the Name property of the object. Next, we pass the variable to the Instance parameter of Set-CsVoiceNormalizationRule to make the change permanent.

See Also