Skip to content

Instantly share code, notes, and snippets.

@mozziemozz
Last active December 19, 2021 20:34
Show Gist options
  • Save mozziemozz/754e813c5e1410f9679af7f64c7d002e to your computer and use it in GitHub Desktop.
Save mozziemozz/754e813c5e1410f9679af7f64c7d002e to your computer and use it in GitHub Desktop.

Get Settings of a user

Get call forwarding settings of a user

Get-CsUserCallingSettings -Identity wendy@domain.com

Delegates

Get people who support a user (delegates)

(Get-CsUserCallingSettings -Identity wendy@domain.com).Delegates

Get people a user supports (delegators)

(Get-CsUserCallingSettings -Identity wendy@domain.com).Delegators

Add a new delegate to a user

New-CsUserCallingDelegate -Identity wendy@domain.com -Delegate bill@domain.com -MakeCalls $true -ManageSettings $true -ReceiveCalls $true

Remove a delegate from a user

Remove-CsUserCallingDelegate -Identity wendy@domain.com -Delegate bill@domain.com

Edit permissions of an existing delegate

Set-CsUserCallingDelegate -Identity wendy@domain.com -Delegate bill@domain.com -ManageSettings $false

Forwardings

ForwardingTargetType

If ForwardingTargetType is set to SingleTarget then the ForwardingTarget must be either a UPN or a phone number. The value names of the other options are:

GUI Name PS Name
Call Group Group
Delegates MyDelegates
Voicemail Voicemail

Set also ring to another Teams User

Set-CsUserCallingSettings -Identity wendy@domain.com -IsForwardingEnabled $true -ForwardingType Simultaneous -ForwardingTarget mike@domain.com -ForwardingTargetType SingleTarget

Set also ring to an external number

Set-CsUserCallingSettings -Identity wendy@domain.com -IsForwardingEnabled $true -ForwardingType Simultaneous -ForwardingTarget +4144xxxxxxx-ForwardingTargetType SingleTarget

Set immediate forwarding to another Teams User

Set-CsUserCallingSettings -Identity wendy@domain.com -IsForwardingEnabled $true -ForwardingType Immediate -ForwardingTarget mike@domain.com -ForwardingTargetType SingleTarget

Set immediate forwarding to an external PSTN number

Set-CsUserCallingSettings -Identity wendy@domain.com -IsForwardingEnabled $true -ForwardingType Immediate -ForwardingTarget +4144xxxxxxx-ForwardingTargetType SingleTarget

If unaswered

Forward to voicemail if unanswered

Set-CsUserCallingSettings -Identity wendy@domain.com -IsUnansweredEnabled $true -UnansweredTargetType Voicemail -UnansweredDelay 00:00:20

Forward to voicemail immediately

Set-CsUserCallingSettings -Identity wendy@domain.com -IsUnansweredEnabled $false
Set-CsUserCallingSettings -Identity wendy@domain.com -IsForwardingEnabled $true -ForwardingType Immediate -ForwardingTargetType Voicemail

Call Groups

Add a single member to a user's call group

Set-CsUserCallingSettings -Identity wendy@domain.com -CallGroupTargets "bobby@domain.com" -CallGroupOrder InOrder

Add multiple members to a user's call group

Set-CsUserCallingSettings -Identity wendy@domain.com -CallGroupTargets "bobby@domain.com","ben@domain.com","mike@domain.com" -CallGroupOrder Simultaneous

Note: With the parameter -CallGroupOrder you can specify if the calls should ring the call group members in the defined order or all at the same time. The respective parameters are called InOrder and Simultaneous

Warning: If you set call group members by PowerShell, all existing members will be removed/overwritten if you don't include them again when setting the call group members with PowerShell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment