Topic Last Modified: 2013-08-13

Removes the specified voice policy. This cmdlet was introduced in Lync Server 2010.

Syntax

Remove-CsVoicePolicy -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Tenant <Guid>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

This example removes the UserVoicePolicy1 per-user voice policy settings.

Copy Code
Remove-CsVoicePolicy -Identity UserVoicePolicy1

EXAMPLE 2

This example removes all the voice policy settings that can be assigned to specific users. First the Get-CsVoicePolicy cmdlet is called with a Filter of tag*, which retrieves all the per-user voice policies. That collection of policies is then piped to the Remove-CsVoicePolicy cmdlet to be removed.

Copy Code
Get-CsVoicePolicy -Filter tag* | Remove-CsVoicePolicy

Detailed Description

This cmdlet removes an existing voice policy. Voice policies are used to manage such Enterprise Voice-related features as simultaneous ringing (the ability to have a second phone ring each time someone calls your office phone) and call forwarding. This cmdlet can also be used to remove the global voice policy. In that case, however, the policy will not actually be removed; instead, the policy settings will simply be reset to their default values.

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

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Rtc.Management.Xds.XdsIdentity

A unique identifier specifying the scope, and in some cases the name, of the policy to be removed.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

Force

Optional

System.Management.Automation.SwitchParameter

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

Tenant

Optional

System.Guid

Globally unique identifier (GUID) of the Office 365 tenant account for the voice policy being deleted. For example:

–Tenant "38aad667-af54-4397-aaa7-e94c79ec2308"

You can return the tenant ID for each of your tenants by running this command:

Get-CsTenant | Select-Object DisplayName, TenantID

If you are using a remote session of Windows PowerShell and are connected only to Lync Online you do not have to include the Tenant parameter. Instead, the tenant ID will automatically be filled in for you based on your connection information. The Tenant parameter is primarily for use in a hybrid deployment.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

Input Types

Microsoft.Rtc.Management.WritableConfig.Policy.Voice.VoicePolicy object. Accepts pipelined input of voice policy objects.

Return Types

This cmdlet does not return a value. It removes an instance of a Microsoft.Rtc.Management.WritableConfig.Policy.Voice.VoicePolicy object.

See Also