編輯

共用方式為


Grant-CsCallingLineIdentity

Use the Grant-CsCallingLineIdentity cmdlet to apply a Caller ID policy to a user account, to a group of users, or to set the tenant Global instance.

Syntax

Grant-CsCallingLineIdentity
     [[-PolicyName] <string>]
     [-Global]
     [-PassThru]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-CsCallingLineIdentity
     [-Group] <string>
     [[-PolicyName] <string>]
     [-PassThru]
     [-Rank <int>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Grant-CsCallingLineIdentity
     [[-Identity] <string>]
     [[-PolicyName] <string>]
     [-PassThru]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

You can either assign a Caller ID policy to a specific user, to a group of users, or you can set the Global policy instance.

Examples

Example 1

PS C:\> Grant-CsCallingLineIdentity -Identity Ken.Myer@contoso.com -PolicyName CallerIDRedmond

This example assigns the Caller ID policy with the Identity CallerIDRedmond to the user Ken.Myer@contoso.com

Example 2

Grant-CsCallingLineIdentity -PolicyName CallerIDSeattle -Global

This example copies the Caller ID policy CallerIDSeattle to the Global policy instance.

Example 3

Grant-CsCallingLineIdentity -Group sales@contoso.com -PolicyName CallerIDSeattle -Rank 10

This example assigns the Caller ID policy with the Identity CallerIDSeattle to the members of the group sales@contoso.com.

Parameters

-Confirm

The Confirm switch causes the command to pause processing and requires confirmation to proceed.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-Global

Sets the parameters of the Global policy instance to the values in the specified policy instance.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-Group

Specifies the group used for the group policy assignment.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-Identity

The Identity of the user to whom the policy is being assigned. User Identities can be specified using the user's SIP address, the user's user principal name (UPN), or the user's ObjectId/Identity.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-PassThru

Enables you to pass a user object through the pipeline that represents the user being assigned the policy. By default, the Grant-CsCallingLineIdentity cmdlet does not pass objects through the pipeline.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-PolicyName

The name (Identity) of the Caller ID policy to be assigned. To remove an existing user level policy assignment, specify PolicyName as $null.

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-Rank

The rank of the policy assignment, relative to other group policy assignments for the same policy type.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

-WhatIf

The WhatIf switch causes the command to simulate its results. By using this switch, you can view what changes would occur without having to commit those changes.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

Notes

The GrantToGroup syntax is supported in Teams PowerShell Module 4.5.1-preview or later.