Bewerken

Delen 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

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

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
Applies to: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
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

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.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False
Applies to: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
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to: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: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).

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

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
Applies to:Microsoft Teams

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.