Grant-CsCallingLineIdentity

Use the `Grant-CsCallingLineIdentity` cmdlet to apply a Caller ID policy to a user account.

Syntax

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

Description

You can either change or block the Caller ID (also called a Calling Line ID) for a user. By default, the Skype for Business Online user's phone number can be seen when that user makes a call to a PSTN phone, or when a call comes in. You can create a Caller ID policy to provide an alternate displayed number, or to block any number from being displayed; you can then apply the Caller ID policy to a specific user.

Examples

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

PS C:\> Grant-CsCallingLineIdentity -Identity "Ken Myer" -PolicyName CallerIDRedmond

This example assigns the Caller ID policy with the Identity CallerIDRedmond to the user with the display name Ken Myer.

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

Grant-CsCallingLineIdentity -PolicyName Anonymous -Identity "amos.marble@contoso.com"

This example grants the Caller ID policy "Anonymous" to the user Amos Marble.

Parameters

-AsJob

Indicates that this cmdlet runs as a background job.

When you specify the AsJob parameter, the command immediately returns an object that represents the background job. You can continue to work in the session while the job finishes. The job is created on the local computer and the results from the Skype for Business Online session are automatically returned to the local computer. To get the job results, use the Receive-Job cmdlet.

For more information about Windows PowerShell background jobs, see about_Jobs and about_Remote_Jobs.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Confirm

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

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-DomainController

This parameter is reserved for internal Microsoft use.

Type:Fqdn
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Identity

The Identity (unique identifier) of the user to whom the policy is being assigned. User Identities can be specified using one of the following formats: 1) the user's SIP address; 2) the user's user principal name (UPN); or, 3) the user's Active Directory display name (for example, Ken Myer).

You can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "*Smith" returns all the users who have a display name that ends with the string value "Smith".

Type:UserIdParameter
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-PassThru

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

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-PolicyName

The name (Identity) of the Caller ID 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).

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Tenant

Globally unique identifier (GUID) of the tenant account whose external user communication policy are being created. For example:

-Tenant "38aad667-af54-4397-aaa7-e94c79ec2308"

You can return your tenant ID 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. Instead, the tenant ID will automatically be filled in for you based on your connection information. The Tenant parameter is primarily for use in a hybrid deployment.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-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
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online