Set-CsUserCallingSettings

This cmdlet will set the call forwarding, simultaneous ringing and call group settings for the specified user.

Syntax

Set-CsUserCallingSettings
   -Identity <String>
   [<CommonParameters>]
Set-CsUserCallingSettings
   -Identity <String>
   -IsForwardingEnabled <Boolean>
   [<CommonParameters>]
Set-CsUserCallingSettings
   -Identity <String>
   -IsForwardingEnabled <Boolean>
   -ForwardingType <String>
   [-ForwardingTarget <String>]
   -ForwardingTargetType <String>
   [<CommonParameters>]
Set-CsUserCallingSettings
   -Identity <String>
   -IsUnansweredEnabled <Boolean>
   [<CommonParameters>]
Set-CsUserCallingSettings
   -Identity <String>
   -IsUnansweredEnabled <Boolean>
   [-UnansweredTarget <String>]
   -UnansweredTargetType <String>
   -UnansweredDelay <String>
   [<CommonParameters>]
Set-CsUserCallingSettings
   -Identity <String>
   -CallGroupOrder <String>
   -CallGroupTargets <String[]>
   [<CommonParameters>]
Set-CsUserCallingSettings
   -Identity <String>
   -GroupMembershipDetails <ICallGroupMembershipDetails[]>
   [<CommonParameters>]
Set-CsUserCallingSettings
   -Identity <String>
   -GroupNotificationOverride <String>
   [<CommonParameters>]

Description

This cmdlet sets the call forwarding, simultaneous ringing and call group settings for the specified user.

When specifying settings you need to specify all settings with a settings grouping, for instance, you can't just change a forwarding target. Instead, you need to start by getting the current settings, making the necessary changes, and then setting/writing all settings within the settings group.

Examples

Example 1

Set-CsUserCallingSettings -Identity [email protected] -IsForwardingEnabled $true -ForwardingType Immediate -ForwardingTargetType Voicemail

This example shows setting immediate call forwarding to voicemail for [email protected].

Example 2

Set-CsUserCallingSettings -Identity [email protected] -IsForwardingEnabled $false

This example shows removing call forwarding for [email protected].

Example 3

Set-CsUserCallingSettings -Identity [email protected] -IsForwardingEnabled $true -ForwardingType Simultaneous -ForwardingTargetType SingleTarget -ForwardingTarget "+12065551234"

This example shows setting simultaneous ringing to +12065551234 for [email protected].

Example 4

Set-CsUserCallingSettings -Identity [email protected] -IsUnansweredEnabled $true -UnansweredTargetType MyDelegates -UnansweredDelay 00:00:30

This example shows setting unanswered call forward to the delegates after 30 seconds for [email protected].

Example 5

$cgm = @("sip:[email protected]","sip:[email protected]")
Set-CsUserCallingSettings -Identity [email protected] -CallGroupOrder InOrder -CallGroupTargets $cgm
Set-CsUserCallingSettings -Identity [email protected] -IsForwardingEnabled $true -ForwardingType Immediate -ForwardingTargetType Group

This example shows creating a call group for [email protected] with 2 members and setting immediate call forward to the call group for [email protected].

Example 6

$ucs = Get-CsUserCallingSettings -Identity [email protected]
$cgt = {$ucs.CallGroupTargets}.Invoke()
$cgt.Add("sip:[email protected]")
$cgt.Remove("sip:[email protected]")
Set-CsUserCallingSettings -Identity [email protected] -CallGroupOrder $ucs.CallGroupOrder -CallGroupTargets $cgt

$gmd = (Get-CsUserCallingSettings -Identity [email protected]).GroupMembershipDetails
$gmd[[array]::IndexOf($gmd.CallGroupOwnerId,'sip:[email protected]')].NotificationSetting = 'Banner'
Set-CsUserCallingSettings -Identity [email protected] -GroupMembershipDetails $gmd

This example shows how to update the call group of [email protected] to add [email protected] and remove [email protected]. In addition the notification setting for [email protected] for [email protected]'s call group is set to Banner.

The key to note here is the call group membership is defined on the object of the owner of the call group, in the above case this is [email protected]. However, the notification setting for a member for a particular call group is defined on the member. In this case [email protected].

Example 7

$ucs = Get-CsUserCallingSettings -Identity [email protected]
Set-CsUserCallingSettings -Identity [email protected] -CallGroupOrder $ucs.CallGroupOrder -CallGroupTargets @()

This example shows how to remove all members of the call group.

Example 8

[Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ICallGroupMembershipDetails[]]$gmd = @(
 [Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ICallGroupMembershipDetails]@{CallGroupOwnerId='sip:[email protected]';NotificationSetting='Banner'}
 [Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ICallGroupMembershipDetails]@{CallGroupOwnerId='sip:[email protected]';NotificationSetting='Mute'}
)
Set-CsUserCallingSettings -Identity [email protected] -GroupMembershipDetails $gmd

In this example [email protected] is a member of two call groups: [email protected] and [email protected]. [email protected] would like to have Banner notification for the first call group and Mute notification for the last one.

Example 9

Set-CsUserCallingSettings -Identity [email protected] -GroupNotificationOverride 'Mute'

This example shows how to set the group notification override for [email protected]. This setting overrides any specific notification setting set for the user on any call group the user is a member of.

Example 10

Set-CsUserCallingSettings -Identity [email protected] -IsForwardingEnabled $false
Set-CsUserCallingSettings -Identity [email protected] -IsUnansweredEnabled $true -UnansweredTargetType Voicemail -UnansweredDelay 00:00:20

This example shows how to set the default call forwarding settings for a user.

Example 11

Set-CsUserCallingSettings -Identity [email protected] -IsUnansweredEnabled $false

This example shows turning off unanswered call forwarding for a user. The Microsoft Teams client will show this as If unanswered Do nothing.

Parameters

-CallGroupOrder

The order in which to call members of the Call Group. The supported values are Simultaneous and InOrder.

You can only use InOrder, if the call group has 5 or less members.

Type:System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-CallGroupTargets

The members of the Call Group. You need to always specify the full set of members as the parameter value. What you set here will overwrite the current call group membership.

A call group can have up to 25 members.

Type:System.Array of System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForwardingTarget

The forwarding target. Supported types of values are ObjectId's, SIP addresses and phone numbers. For phone numbers we support the following types of formats: E.164 (+12065551234 or +1206555000;ext=1234) or non-E.164 like 1234.

Only used when ForwardingTargetType is SingleTarget.

Type:System.String
Position:named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForwardingTargetType

The forwarding target type. Supported values are Voicemail, SingleTarget, MyDelegates and Group. Voicemail is only supported for Immediate forwarding.

SingleTarget is used when forwarding to another user or PSTN phone number. MyDelegates is used when forwarding to the users's delegates (there needs to be at least 1 delegate). Group is used when forwarding to the user's call group (it needs to have at least 1 member).

Type:System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForwardingType

The type of forwarding to set. Supported values are Immediate and Simultaneous

Type:System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-GroupMembershipDetails

The group membership details for the specified user. It is an array of ICallGroupMembershipDetails, which is an object containing the identity of an owner of a call group and the notification setting for the specified user for that call group.

This parameter only exists if the specified user is a member of a call group. You can't create it, you can only change it.

You need to always specify the full group membership details as the parameter value. What you set here will over-write the current group membership details.

Type:Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.ICallGroupMembershipDetails[]
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-GroupNotificationOverride

The group notification override that will be set on the specified user. The supported values are Ring, Mute and Banner.

The initial setting is shown as Null. It means that the group notification set for the user in the call group is used. If you set GroupNotificationOverride to Mute, that setting will override the group notification for the user in the call group. If you set the GroupNotificationOverride to Ring or Banner, the group notification set for the user in the call group will be used.

Type:System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Identity

The Identity of the user to set call forwarding, simultaneous ringing and call group settings for. Can be specified using the ObjectId or the SIP address.

Type:System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-IsForwardingEnabled

This parameter controls whether forwarding is enabled or not.

Type:System.Boolean
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-IsUnansweredEnabled

This parameter controls whether forwarding for unanswered calls is enabled or not.

Type:System.Boolean
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-UnansweredDelay

The time the call will ring the user before it is forwarded to the unanswered target. The supported format is hh:mm:ss and the delay range needs to be between 10 and 60 seconds in 10 seconds increments, i.e. 00:00:10, 00:00:20, 00:00:30, 00:00:40, 00:00:50 and 00:01:00. The default value is 20 seconds.

Type:System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-UnansweredTarget

The unanswered target. Supported type of values are ObjectId, SIP address and phone number. For phone numbers we support the following types of formats: E.164 (+12065551234 or +1206555000;ext=1234) or non-E.164 like 1234.

Only used when UnansweredTargetType is SingleTarget.

Type:System.String
Position:named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UnansweredTargetType

The unanswered target type. Supported values are Voicemail, SingleTarget, MyDelegates and Group.

SingleTarget is used when forwarding the unanswered call to another user or phone number. MyDelegates is used when forwarding the unanswered call to the users's delegates. Group is used when forwarding the unanswered call to the specified user's call group.

Type:System.String
Position:named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object

Notes

The cmdlet is available in Teams PowerShell module 4.0.0 or later.

The specified user need to have the Microsoft Phone System license assigned.

When forwarding to MyDelegates, the specified user needs to have one or more delegates defined that are allowed to receive calls. When forwarding to Group, the specified user needs to have one or more members of the user's call group.

The cmdlet is validating the different settings and is always writing all the parameters in a settings group. You might see validation errors from the cmdlet due to this behavior. As an example, if you have ForwardingTargetType set to Group and you want to remove all members of the call group, you will get a validation error.

You can specify a SIP URI without 'sip:' on input, but the output from Get-CsUserCallingSettings will show the full SIP URI.

You are not able to configure delegates via this cmdlet. Please use New-CsUserCallingDelegate, Set-CsUserCallingDelegate cmdlets and Remove-CsUserCallingDelegate.