Share via


Set-CsHostedVoicemailPolicy

 

Topic Last Modified: 2012-03-26

Modifies a hosted voice mail policy.

Syntax

Set-CsHostedVoicemailPolicy [-Identity <XdsIdentity>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-Destination <String>] [-Force <SwitchParameter>] [-Organization <String>] [-WhatIf [<SwitchParameter>]]

Set-CsHostedVoicemailPolicy [-Confirm [<SwitchParameter>]] [-Description <String>] [-Destination <String>] [-Force <SwitchParameter>] [-Instance <PSObject>] [-Organization <String>] [-WhatIf [<SwitchParameter>]]

Detailed Description

This cmdlet modifies a policy that configures a user account enabled for Microsoft Lync Server 2010 or Microsoft Office Communications Server to use an Exchange Unified Messaging (UM) hosted voice mail service. The policy determines how to route unanswered calls to the user to a hosted Exchange UM service.

A user must be enabled for Exchange UM hosted voice mail for this policy to take effect. You can call the Get-CsUser cmdlet and check the HostedVoiceMail property to determine whether a user is enabled for hosted voice mail. (A value of True means the user is enabled.)

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

Parameters

Parameter Required Type Description

Identity

Optional

String

A unique identifier for the hosted voice mail policy you want to modify. This identifier includes the scope (in the case of global), the scope and site (for a site policy, such as site:Redmond), or the policy name (for a per-user policy, such as HVUserPolicy).

Instance

Optional

HostedVoicemailPolicy

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

Description

Optional

String

A friendly description of the policy.

Destination

Optional

String

The value assigned to this parameter is the fully qualified domain name (FQDN) of the hosted Exchange UM service.

If you attempt to enable a user for hosted voice mail and the user’s assigned policy does not have a Destination value, the enable will fail.

This value must be 255 characters or less and in a format matching the regular expression string ^[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+){0,}$. This just means it should be in the form of an FQDN, such as server.litwareinc.com.

Organization

Optional

String

This parameter contains a comma-separated list of the Exchange tenants that contain Lync Server 2010 users. Each tenant must be specified as an FQDN of the tenant on the hosted Exchange Service.

Force

Optional

SwitchParameter

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

WhatIf

Optional

SwitchParameter

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

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

Input Types

Microsoft.Rtc.Management.WritableConfig.Policy.Voice.HostedVoicemailPolicy object. Accepts pipelined input of hosted voice mail policy objects.

Return Types

This cmdlet modifies an object of type Microsoft.Rtc.Management.WritableConfig.Policy.Voice.HostedVoicemailPolicy

Example

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

Set-CsHostedVoicemailPolicy -Identity ExRedmond -Destination ExUM.contoso.com

This command modifies the Destination property of a hosted voice mail policy named ExRedmond. It sets the Exchange UM destination for this policy to be at FQDN ExUM.contoso.com.

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

$a = (Get-CsHostedVoicemailPolicy -Identity ExRedmond).Organization
$a += ",corp3.litwareinc.com"
Set-CsHostedVoicemailPolicy -Identity ExRedmond -Organization $a

This command adds an Exchange tenant to the comma-separated list of tenants (organizations) for the policy ExRedmond. The first line calls Get-CsHostedVoicemailPolicy to retrieve the policy with the Identity ExRedmond. This cmdlet call is in parentheses because we need to first retrieve this policy. We then use "dot notation" to retrieve the Organization property of the policy. We save the returned string in the variable $a. The next line uses the += operator to append the assigned string (,corp3.litwareinc.com) to the end of the string stored in variable $a. (Note the comma in the assigned string. Organization is a comma-separated list, so if there’s already a value in the list any additional values need to be preceded by a comma.) Finally, in the last line we call Set-CsHostedVoicemailPolicy and assign the new Organization string by passing the variable $a to the parameter Organization.