[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Assigns a hosted voicemail policy at the per-user scope. (The per-user scope enables you to assign policies to individual users or groups.)

Syntax

Grant-CsHostedVoicemailPolicy -Identity <UserIdParameter> [-PolicyName <String>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-PassThru <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

UserIdParameter

The Identity (unique identifier) of the user to whom the hosted voicemail policy is being assigned.

User Identities can be specified using one of four formats: 1) The user's SIP address; 2) the user’s user principal name; 3) the user's domain name and logon name, in the form domain\logon (e.g., litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). Note that the SAMAccountName cannot be used as an identity; that's because these names are not necessarily unique in a forest.

Note that you can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "* Smith" would return all the users with the last name Smith.

Full data type: Microsoft.Rtc.Management.AD.UserIdParameter

PolicyName

Optional

String

The name (Identity) of the hosted voicemail policy to be assigned to the user. (Note that this includes only the name portion of the Identity. Per-user hosted voicemail policy identities include a prefix of tag: that should not be included with the PolicyName.)

DomainController

Optional

Fqdn

Allows you to specify a domain controller. If no domain controller is specified, the first available will be used.

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

PassThru

Optional

SwitchParameter

Returns the results of the command. By default, this cmdlet does not generate any output.

WhatIf

Optional

SwitchParameter

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

Detailed Description

This cmdlet assigns an existing user-specific hosted voice mail policy to a user. A hosted voicemail policy specifies how to route unanswered calls to a user to a hosted Microsoft Exchange Unified Messaging (UM) service.

You can check whether a user has been granted a per-user hosted voicemail policy by calling a command in this format: Get-CsUser "<user name>" | Select-Object HostedVoicemailPolicy. For example:

Copy Code
Get-CsUser "Ken Myer" | Select-Object HostedVoicemailPolicy

If you assign a hosted voice mail policy that does not include a destination to a user, you will not be able to enable that user for hosted voice mail.

Return Types

This cmdlet does not return a value.

Examples

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

Copy Code
Grant-CsHostedVoicemailPolicy -Identity "Ken Myer" -PolicyName ExRedmond

This example assigns the hosted voicemail policy with the Identity ExRedmond to the user with the display name Ken Myer.

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

Copy Code
Get-CsUser -OU "ou=Finance,ou=North America,dc=litwareinc,dc=com" | Grant-CsHostedVoicemailPolicy -PolicyName ExRedmond

This example assigns the hosted voicemail policy with the Identity ExRedmond to all users in the OU OU=Finance,OU-NorthAmerica,DC=litwareinc,DC=com. The first part of the command calls the Get-CsUser cmdlet to retrieve all Communications Server-enabled users from the specified OU. This collection of users is then piped to the Grant-CsHostedVoicemailPolicy cmdlet, which assigns the policy ExRedmond to each of these users.