Edit

Share via


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

Identity (Default)

Grant-CsDialoutPolicy
    [[-Identity] <string>]
    [[-PolicyName] <string>]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

GrantToTenant

Grant-CsDialoutPolicy
    [[-PolicyName] <string>]
    [-PassThru]
    [-Global]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

GrantToGroup

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

Description

In 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. The policies apply to all the different PSTN connectivity options for Microsoft Teams; Calling Plan, Direct Routing, and Operator Connect.

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 "DialoutCPCandPSTNInternational"

This example sets the tenant global policy instance to DialoutCPCandPSTNInternational.

Example 5

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

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

Parameters

-Confirm

Applicable: Microsoft Teams

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Global

Applicable: Microsoft Teams

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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GrantToTenant
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Group

Applicable: Microsoft Teams

Specifies the group used for the group policy assignment.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GrantToGroup
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Microsoft Teams

Specifies the Identity of the user account to be to be modified. A user identity can be specified by using one of three formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's ObjectId/Identity.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Identity
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-PassThru

Applicable: Microsoft Teams

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PolicyName

Applicable: Microsoft Teams

"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:DialoutCPCZoneAPSTNDomestic has a PolicyName equal to DialoutCPCZoneAPSTNDomestic.

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Rank

Applicable: Microsoft Teams

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

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GrantToGroup
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: Microsoft Teams

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

System.Object

Notes

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

The cmdlet is not supported for Teams resource accounts.