Edit

Share via


Set-CsVoiceConfiguration

Modifies a list of voice test configurations. This cmdlet was introduced in Lync Server 2010.

Syntax

Identity

Set-CsVoiceConfiguration
    [[-Identity] <XdsIdentity>]
    [-VoiceTestConfigurations <PSListModifier>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Instance

Set-CsVoiceConfiguration
    [-Instance <PSObject>]
    [-VoiceTestConfigurations <PSListModifier>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Voice test configurations are used to test a phone number against a specific voice policy, route and dial plan. This cmdlet can be used to modify voice test configurations from a list containing all the voice test configurations for a Skype for Business Server deployment.

This cmdlet modifies an object of type VoiceConfiguration. This object is simply a container object for voice test configurations. Therefore, the use of this cmdlet is not recommended. To modify voice configurations, modify the individual voice test configurations by calling the Set-CsVoiceTestConfiguration cmdlet.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsVoiceConfiguration 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-CsVoiceConfiguration"}

Examples

Example 1

$a = Get-CsVoiceConfiguration

$b = $a.VoiceTestConfigurations | Where-Object {$_.Name -eq "TestConfig2"}

$b.DialedNumber = "5551212"

$b.ExpectedTranslatedNumber = "+5551212"

Set-CsVoiceConfiguration -Instance $a

It takes several steps to modify a test voice configuration within a voice configuration. In this example, we start by retrieving the voice configuration object by calling the Get-CsVoiceConfiguration cmdlet. We assign the object retrieved (there will be only one) to the variable $a.

In line 2 of this example we retrieve the contents of the VoiceTestConfigurations property, which is a collection of voice test configuration objects, from variable $a. We then pipe that collection to the Where-Object cmdlet, where we search the collection for the voice test configuration object with a Name equal to the string TestConfig2. We assign that object to the variable $b.

Next, we modify the TestConfig2 voice test configuration object by assigning new values to the properties DialedNumber and ExpectedTranslatedNumber. By updating that object we've updated the object in variable $a. However, that object is still only in memory. As a final step, we need to save those changes by passing $a to the Instance parameter of the Set-CsVoiceConfiguration cmdlet.

This is not the recommended way of modifying a voice configuration. To modify a voice configuration, simply change the individual voice test configurations with the Set-CsVoiceTestConfiguration cmdlet, as shown here:

Set-CsVoiceTestConfiguration -Identity TestConfig2 -DialedNumber 5551212 -ExpectedTranslatedNumber +5551212

That one line will accomplish the same task shown in Example 1.

Parameters

-Confirm

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Prompts you for confirmation before executing the command.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

The scope of this object. The only value possible for this parameter is Global.

Parameter properties

Type:XdsIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Instance

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

A reference to a voice configuration (Microsoft.Rtc.Management.WritableConfig.Policy.Voice.VoiceConfiguration) object. An object of this type can be retrieved by calling the Get-CsVoiceConfiguration cmdlet.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Instance
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VoiceTestConfigurations

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

A list of all voice test configurations (Microsoft.Rtc.Management.WritableConfig.Policy.Voice.TestConfiguration objects) defined for the Skype for Business Server deployment.

You should modify individual voice test configuration objects by using the Set-CsVoiceTestConfiguration cmdlet. That is the recommended way of modifying configurations in this list.

Parameter properties

Type:PSListModifier
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Rtc.Management.WritableConfig.Policy.Voice.VoiceConfiguration

The Set-CsVoiceConfiguration cmdlet accepts pipelined input of a voice configuration object.

Outputs

None

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