external help file | online version | applicable | title | schema | manager | author | ms.author | ms.reviewer |
---|---|---|---|---|---|---|---|---|
Microsoft.Rtc.Management.Hosted.dll-help.xml |
Microsoft Teams |
Grant-CsOnlineVoiceRoutingPolicy |
2.0.0 |
bulenteg |
jenstrier |
serdars |
Assigns a per-user online voice routing policy to one user, a group of users, or sets the Global policy instance. Online voice routing policies manage online PSTN usages for Phone System users.
Grant-CsOnlineVoiceRoutingPolicy [[-Identity] <string>] [[-PolicyName] <string>] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Grant-CsOnlineVoiceRoutingPolicy [[-PolicyName] <string>] [-PassThru] [-Global] [-WhatIf] [-Confirm] [<CommonParameters>]
Grant-CsOnlineVoiceRoutingPolicy [-Group] <string> [[-PolicyName] <string>] [-PassThru] [-Rank <int>] [-WhatIf] [-Confirm] [<CommonParameters>]
Online voice routing policies are used in Microsoft Phone System Direct Routing scenarios. Assigning your Teams users an online voice routing policy enables those users to receive and to place phone calls to the public switched telephone network by using your on-premises SIP trunks.
Note that simply assigning a user an online voice routing policy will not enable them to make PSTN calls via Teams. Among other things, you will also need to enable those users for Phone System and will need to assign them an appropriate online voice policy.
Grant-CsOnlineVoiceRoutingPolicy -Identity Ken.Myer@contoso.com -PolicyName "RedmondOnlineVoiceRoutingPolicy"
The command shown in Example 1 assigns the per-user online voice routing policy RedmondOnlineVoiceRoutingPolicy to the user ken.myer@contoso.com.
Grant-CsOnlineVoiceRoutingPolicy -Identity Ken.Myer@contoso.com -PolicyName $Null
In Example 2, any per-user online voice routing policy previously assigned to the user Ken Myer is unassigned from that user; as a result, Ken Myer will be managed by the global online voice routing policy. To unassign a per-user policy, set the PolicyName to a null value ($null).
Get-CsOnlineUser | Grant-CsOnlineVoiceRoutingPolicy -PolicyName "RedmondOnlineVoiceRoutingPolicy"
Example 3 assigns the per-user online voice routing policy RedmondOnlineVoiceRoutingPolicy to all the users in the tenant. To do this, the command first calls the Get-CsOnlineUser
cmdlet to get all user accounts enabled for Microsoft Teams or Skype for Business Online. Those user accounts are then piped to the Grant-CsOnlineVoiceRoutingPolicy
cmdlet, which assigns each user the online voice routing policy RedmondOnlineVoiceRoutingPolicy.
Grant-CsOnlineVoiceRoutingPolicy -PolicyName "RedmondOnlineVoiceRoutingPolicy" -Global
Example 4 assigns the per-user online voice routing policy RedmondOnlineVoiceRoutingPolicy as the global online voice routing policy. This affects all the users in the tenant, except any that have an explicit policy assignment.
Grant-CsOnlineVoiceRoutingPolicy -Group sales@contoso.com -Rank 10 -PolicyName "RedmondOnlineVoiceRoutingPolicy"
Example 5 assigns the online voice routing policy RedmondOnlineVoiceRoutingPolicy to all members of the group sales@contoso.com.
Indicates the Identity of the user account to be assigned the per-user online voice routing policy. User Identities can be specified using one of the following formats: the user's SIP address, the user's user principal name (UPN), or the user's Active Directory display name (for example, Ken Myer).
Type: String
Parameter Sets: Identity
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
Enables you to pass a user object through the pipeline that represents the user account being assigned the online voice routing policy. By default, the Grant-CsOnlineVoiceRoutingPolicy
cmdlet does not pass objects through the pipeline.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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:RedmondOnlineVoiceRoutingPolicy has a PolicyName equal to RedmondOnlineVoiceRoutingPolicy.
To unassign a per-user policy previously assigned to a user, set the PolicyName to a null value ($Null).
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
When you use this cmdlet without specifying a user identity, the policy applies to all users in your tenant, except any that have an explicit policy assignment. To skip a warning when you do this operation, specify this parameter.
Type: SwitchParameter
Parameter Sets: GrantToTenant
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the group used for the group policy assignment.
Type: String
Parameter Sets: GrantToGroup
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The rank of the policy assignment, relative to other group policy assignments for the same policy type.
Type: Int32
Parameter Sets: GrantToGroup
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The GrantToGroup syntax is supported in Teams PowerShell Module 4.5.1-preview or later.
New-CsOnlineVoiceRoutingPolicy
Get-CsOnlineVoiceRoutingPolicy