Grant-CsDialoutPolicy

Use the Grant-CsDialoutPolicy cmdlet to assign the tenant global, a group of users, or a per-user outbound calling restriction policy to one or more users.

Syntax

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

Description

In Skype for Business Online and Microsoft Teams, outbound calling restriction policies are used to restrict the type of audio conferencing and end user PSTN calls that can be made by users in your organization. To get all the available policies in your organization run Get-CsOnlineDialOutPolicy.

Examples

Example 1

Grant-CsDialoutPolicy -Identity "ken.myer@contoso.com" -PolicyName "DialoutCPCandPSTNInternational"

This example assigns the per-user outbound calling restriction policy DialoutCPCandPSTNInternational to the user with the User Principal Name "ken.myer@contoso.com".

Example 2

Grant-CsDialoutPolicy -Identity "ken.myer@contoso.com" -PolicyName $Null

In this example, any per-user outbound calling restriction policy previously assigned to the user ken.myer@contoso.com is unassigned from that user; as a result, Ken Myer will be managed by the global outbound calling restriction policy. To unassign a per-user policy, set the PolicyName to a null value ($Null).

Example 3

Get-CsOnlineUser | Grant-CsDialoutPolicy -PolicyName "DialoutCPCInternationalPSTNDisabled"

This example assigns the per-user outbound calling restriction policy DialoutCPCInternationalPSTNDisabled to all the users in your organization.

Example 4

Grant-CsDialoutPolicy -Global -PolicyName "InternationalAndDomestic"

This example sets the tenant global policy instance to InternationalAndDomestic.

Example 5

Grant-CsDialoutPolicy -Group support@contoso.com -Rank 10 -PolicyName "InternationalAndDomestic"

This example assigns the policy instance "InternationalAndDomestic" to the members of the group support@contoso.com.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

This parameter sets the tenant global policy instance. This is the policy that all users in the tenant will get unless they have a specific policy instance assigned.

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

Specifies the group used for the group policy assignment.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online, Microsoft Teams
-Identity

Specifies the Identity of the user account to be to be modified. A user identity can be specified by 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). You can also reference a user account by using the user's Active Directory distinguished name.

Type:UserIdParameter
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online, Microsoft Teams
-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, Microsoft Teams
-PolicyName

"Name" of the policy to be assigned. The PolicyName is simply the policy Identity minus the policy scope (the "tag:" prefix). For example, a policy with the Identity tag:Redmond has a PolicyName equal to Redmond; likewise, a policy with the Identity tag:RedmondPolicy has a PolicyName equal to RedmondPolicy.

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

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online, 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
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online, Microsoft Teams
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online, Microsoft Teams

Outputs

System.Object

Notes

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