SfBS 2019 SEFAUtil in PowerShell

Added to Skype for Business Server 2019 from CU1 is “SEFAUtil” functionality in native PowerShell. No longer do you need to install a clunky “Trusted Application”.

SEFA-WhatNow?

Such innocence. You don’t know the world of pain you’ve missed!

“Secondary Extension Feature Activation Utility” – to give it its full name – has historically shipped in the Lync and Skype for Business “Resource Kit” (“ResKit”) download pack. When correctly integrated into the topology it gives support staff the ability to query, set and cancel all manner of call-forwarding and team/delegation settings from the comfort of their cube, without needing to visit the user or reset their AD password in order to do it remotely (after signing in as that user). It’s a godsend when someone goes on leave unexpectedly or has a catastrophic PC failure with an urgent incoming call pending, and as equally helpful when configuring the settings for executives and other ‘sensitive’ users.

Unfortunately however SEFAUtil is terribly slow in operation, “finicky” to use, seemingly inconsistent (even on its good days) and (as it’s a free-standing executable) not so easily automated or batched.

There have been calls for years to have SEFAUtil reborn as native commandlets within SfB. Landis Technologies rose to this challenge in 2017 with its groundbreaking “SEFAUtil Server”. I’ve blogged about it on a couple of occasions, including this review.

New Commandlets

The following Commandlets were added in CU1:

Get/Set-CsUserCallForwardingSettings
Get/Set-CsUserDelegates
Get/Set-CsUserTeamMembers

Sample Commands

In case you’d like a hand understanding the syntax of these new commands, here are a few samples.

Activate call forward immediate

Activate an immediate call-forward to a (fictitious) Aussie mobile number:

Set-CsUserCallForwardingSettings user@contoso.com -EnableForwarding +61491578888

Cancel an immediate call-forward

This cancels a previously-activated call forward. If the user’s calls were previously set to forward to voicemail on no answer, this will be reinstated automatically:

Set-CsUserCallForwardingSettings user@contoso.com -DisableForwarding

Send unanswered calls to voicemail after 20 seconds

There’s a trick with this one, as you need to include “DisableForwarding” in the same command string:

Set-CsUserCallForwardingSettings user@contoso.com -DisableForwarding -UnansweredToVoicemail -UnansweredWaitTime 20

Add and remove some delegates

Set-CsUserDelegates gilligan@contoso.com -Delegates @{Add="skipper@contoso.com"; Remove="thurston.howell3@contoso.com", "lovey.howell@contoso.com"}

Replace all existing delegates with new ones

Set-CsUserDelegates gilligan@contoso.com -Delegates @{Replace="ginger@contoso.com","professor@contoso.com"}

Team call management

For team call group members, use the same format as the delegates command above, but using the Set-CsUserTeamMembers cmdlet and the “-Team” attribute:

Set-CsUserTeamMembers gilligan@contoso.com -Team @{Add="skipper@contoso.com"}

Sim-ring to the user’s team call group

Set-CsUserCallForwardingSettings jessica@bimbonet.net -EnableSimulRing Team -TeamDelegateRingWaitTime 10

The “Ring your team-call group after this many seconds” value – specified here as “-TeamDelegateRingWaitTime” – defaults to 0 if you don’t include it. The only valid options at this time are 0, 5 or 10s.

The cmdlet will fail with a red error message if the user has no members in their team:

Set-CsUserCallForwardingSettings : Team can't be null for team call operation.

Known Issues

Output “lags”

Sometimes if you make a change, the “updated” output that follows the cmdlet will not reflect this. Here’s an example:

PS C:\> Set-CsUserCallForwardingSettings jessica@contoso.net -EnableForwarding +61491578888

User                             : sip:jessica@contoso.net
CallForwardingEnabled            : False
ForwardDestination               :
ForwardImmediateEnabled          : False
SimultaneousRingEnabled          : False
SimultaneousRingDestination      :
ForwardToDelegates               : False
SimultaneousRingDelegates        : False
TeamRingEnabled                  : False
Team                             : {}
Delegates                        : {}
DelegateRingWaitTime             : 0
TeamDelegateRingWaitTime         : 0
SettingsActiveWorkhours          : False
UnansweredToVoicemail            : True
UnansweredCallForwardDestination :
UnansweredWaitTime               : 30

PS C:\> 

But if you wait only a few seconds and do a fresh “get-“, there it is:

PS C:\> get-CsUserCallForwardingSettings jessica@contoso.net

User                             : sip:jessica@contoso.net
CallForwardingEnabled            : True
ForwardDestination               : sip:+61491578888@contoso.net;user=phone
ForwardImmediateEnabled          : True
SimultaneousRingEnabled          : False
SimultaneousRingDestination      :
ForwardToDelegates               : False
SimultaneousRingDelegates        : False
TeamRingEnabled                  : False
Team                             : {}
Delegates                        : {}
DelegateRingWaitTime             : 0
TeamDelegateRingWaitTime         : 0
SettingsActiveWorkhours          : False
UnansweredToVoicemail            : False
UnansweredCallForwardDestination :
UnansweredWaitTime               : 0

PS C:\>

Microsoft is aware of this, so until it’s resolved just be careful. If you’re scripting any of this, I suggest you follow every “set” with a brief pause and then a “get”, on which you will then act if required.

Some states not captured correctly

Clearly this is will be resolved in a later update, but at the moment you might find the odd state that’s not correctly reflected in the get-CsUserCallForwardingSettings output.

One example I’ve found is if the user activates a call-forward to voicemail. The get-CsUserCallForwardingSettings cmdlet reports “CallForwardingEnabled : False”.

PS C:> Get-CsUserCallForwardingSettings gilligan

User                             : sip:gilligan@contoso.net
CallForwardingEnabled            : False
ForwardDestination               :
ForwardImmediateEnabled          : False
SimultaneousRingEnabled          : False
SimultaneousRingDestination      :
ForwardToDelegates               : False
SimultaneousRingDelegates        : False
TeamRingEnabled                  : False
Team                             : {}
Delegates                        : {}
DelegateRingWaitTime             : 0
TeamDelegateRingWaitTime         : 0
SettingsActiveWorkhours          : False
UnansweredToVoicemail            : True
UnansweredCallForwardDestination :
UnansweredWaitTime               : 30

Installation

You don’t need to do anything special to install this new functionality – it’s all baked into CU1. Having said that, don’t overlook the Update-CsAdminRole step.

If you’re at all doubtful, check out the Installation section of my CU1 post from earlier today.

Revision History

12th July 2019: This is the initial publication.

 
– G.

8 Comments

  1. Hello,

    do you know how to enable group call pickup for users in Skype for Business Server 2019?
    I can’t find anything useful in the new cmdlets and SEFAUtil.exe seems to be not supported for SfBS 2019…

    Best regards
    Nils

  2. Is anybody else not able to run these commands unless you start the Powershell session as an admin? This happens to me both on a local PS on the SfB frontend (tells me something about a TLS error in case I start it as a non admin), as well as a remote PS (tells me the command is not recognized).

  3. Hi,

    one more problem with the new cmdlets…
    The parameter -UnansweredToOther from the cmdlet Set-CsUserCallForwardingSettings doesn’t work properly.
    The output of Get-CsUserCallForwardingSettings seems o.k. but the forwarding does not work and the call is rejected instead of forwarded.

    When I call the settings in the SfB client after that and click OK to save it (without any changes) it works as well as when I make the changes directly in the SfB client settings (not using the cmdlet).

    I thought that the september update fixed it but meanwhile the issue came back. I don’t know why…

    Best regards
    Nils

Leave a Reply

Your email address will not be published. Required fields are marked *

... and please just confirm for me that you're not a bot first: Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.