編集

次の方法で共有


Grant-CsDialPlan

Assigns a dial plan to one or more users or groups. This cmdlet was introduced in Lync Server 2010.

Syntax

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

Description

This cmdlet assigns an existing user-specific dial plan to a user. Dial plans provide information required to enable Enterprise Voice users to make telephone calls. Users who do not have a valid dial plan will not be enabled to make calls by using Enterprise Voice. A dial plan determines such things as how normalization rules are applied and whether a prefix must be dialed for external calls.

You can check whether a user has been granted a per-user dial plan by calling a command in this format: Get-CsUser "<user name>" | Select-Object DialPlan

For example:

Get-CsUser "Ken Myer" | Select-Object DialPlan

Examples

-------------------------- EXAMPLE 1 --------------------------

Grant-CsDialPlan -Identity "Ken Myer" -PolicyName RedmondDialPlan

In the example, the Grant-CsDialPlan cmdlet is used to assign the dial plan RedmondDialPlan to the user with the Identity (in this case the display name) Ken Myer.

-------------------------- EXAMPLE 2 --------------------------

Get-CsUser -LDAPFilter "l=Redmond" | Grant-CsDialPlan -PolicyName RedmondDialPlan

In Example 2, the RedmondDialPlan dial plan is assigned to all the users who have offices in the city of Redmond. To do this, the Get-CsUser cmdlet is invoked in order to retrieve a collection of all the users who have an office in the city of Redmond; this is done by using the LdapFilter parameter and the LDAP query l=Redmond. (In the LDAP query language used by Active Directory Domain Services, the l indicates a user's locality, or city.) This collection is then piped to the Grant-CsDialPlan cmdlet, which assigns the Redmond dial plan to each user in the collection.

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-DomainController

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

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Identity

The Identity (unique identifier) of the user to whom the dial plan 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 (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).

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

Type:UserIdParameter
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-PassThru

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-PolicyName

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

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

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

Microsoft.Rtc.Management.AD.UserIdParameter

Outputs

When used with the PassThru parameter, returns an object of type Microsoft.Rtc.Management.ADConnect.Schema.OCSADUserOrAppContact.

System.Object