Grant-CsTeamsCallHoldPolicy

Assigns a per-user Teams call hold policy to one or more users. The Teams call hold policy is used to customize the call hold experience for Teams clients.

Syntax

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

Description

Teams call hold policies are used to customize the call hold experience for teams clients. When Microsoft Teams users participate in calls, they have the ability to hold a call and have the other entity in the call listen to an audio file during the duration of the hold.

Assigning a teams call hold policy to a user sets an audio file to be played during the duration of the hold.

Examples

Example 1

Grant-CsTeamsCallHoldPolicy -Identity 'KenMyer@contoso.com' -PolicyName 'ContosoPartnerTeamsCallHoldPolicy'

The command shown in Example 1 assigns the per-user Teams call hold policy, ContosoPartnerTeamsCallHoldPolicy, to the user with the user principal name (UPN) "KenMyer@contoso.com".

Example 2

Grant-CsTeamsCallHoldPolicy -Identity 'Ken Myer' -PolicyName 'ContosoPartnerTeamsCallHoldPolicy'

The command shown in Example 2 assigns the per-user Teams call hold policy, ContosoPartnerTeamsCallHoldPolicy, to the user with the display name "Ken Myer".

Example 3

Grant-CsTeamsCallHoldPolicy -Identity 'Ken Myer' -PolicyName $null

In Example 3, any per-user Teams call hold policy previously assigned to the user "Ken Myer" is revoked. As a result, the user will be managed by the global Teams call hold policy.

Example 4

Grant-CsTeamsCallHoldPolicy -Global -PolicyName 'ContosoPartnerTeamsCallHoldPolicy'

The command shown in Example 4 sets the Teams call hold policy, ContosoPartnerTeamsCallHoldPolicy, as the Global policy which will apply to all users in your tenant.

Example 5

Grant-CsTeamsCallHoldPolicy -Group sales@contoso.com -Rank 10 -PolicyName 'ContosoPartnerTeamsCallHoldPolicy'

The command shown in Example 5 sets the Teams call hold policy, ContosoPartnerTeamsCallHoldPolicy, to the members of the group sales@contoso.com.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-Global

When you use this cmdlet without specifying a user identity, the policy applies to all users in your tenant. To skip a warning when you do this operation, specify "-Global".

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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

-Identity

Indicates the Identity of the user account to be assigned the per-user Teams call hold policy. User Identities can be specified using one of the following formats:

  • The user's SIP address;
  • The user's user principal name (UPN);
  • The user's Active Directory display name (for example, Ken Myer).
Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Enables you to pass a user object through the pipeline that represents the user account being assigned the Teams call hold policy.

By default, the Grant-CsTeamsCallHoldPoly 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

-PolicyName

Name of the policy to be assigned. The PolicyName is simply the policy Identity without the policy scope, i.e. the "Tag:" prefix.

For example, a policy with the Identity Tag:ContosoPartnerCallHoldPolicy has a PolicyName equal to ContosoPartnerCallHoldPolicy.

To revoke a per-user policy previously assigned to a user, set the PolicyName to a null value ($null).

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Outputs

System.Object

Notes

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