Grant-CsOnlineVoicemailPolicy

 

Topic Last Modified: 2017-03-22

Use the Grant-CsOnlineVoicemailPolicy cmdlet to assign a voicemail policy to a user.

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

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

Grant-CsOnlineVoicemailPolicy -Identity "Ken Myer" -PolicyName "TranscriptionDisabled" 

This example assigns the voicemail policy with the Identity TranscriptionDisabled to the user with the SIP address “sip:ken@contoso.com”.

Grant-CsOnlineVoicemailPolicy -Identity "sip:ken@contoso.com" -PolicyName "TranscriptionDisabled" 

This cmdlet assigns an existing per-user voicemail policy to a user. Voicemail policies are used to manage Voicemail-related features such as transcription.

You can check whether a user has been granted a per-user voicemail policy by calling a command in this format:

Get-CsOnlineUser "<user identity>" | Select-Object OnlineVoicemailPolicy

For example:

Get-CsOnlineUser "Ken Myer" | Select-Object OnlineVoicemailPolicy

 

Parameter Required Type Description

Identity

Required

Microsoft.Rtc.Management.AD.UserIdParameter

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

User identities can be specified by using one of four formats: 1) The user's SIP address; 2) the user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer).

NoteNote:
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.

PolicyName

Required

System.String

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

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

DomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

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

PassThru

Optional

System.Management.Automation.SwitchParameter

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

Tenant

Optional

System.Guid

Globally unique identifier (GUID) of the Skype for Business Online tenant account.

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 Skype for Business Online you do not have to include the Tenant parameter.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

String. Accepts a pipelined string value representing the Identity of a user account to which the voice policy is being granted.

By default, the Grant-CsOnlineVoicemailPolicy cmdlet returns no objects or values. However, if you include the PassThru parameter, the cmdlet will return instances of the Microsoft.Rtc.Management.ADConnect.Schema.OCSUserOrAppContact object.

 
Show: