0 votes

When I try to provision a user for Enterprise Voice using the Line URI entry TEL:%telephoneNumber% or any other entry I get the an error. (below) When I leave the Line URI field blank Adaxes creates the Lync users without an issue. Any ideas?

Adaxes 3.6.10109.0
Windows Server 2012
Lync 2013

Also when I try to do the EV piece with a power shell script I get:

The PS script is this:

Import-module Lync
Set-CsUser –Identity "%displayName%" -EnterpriseVoiceEnabled $True –LineUri "TEL:%telephoneNumber%"

any ideas or help would be appreciated.
Jim

by (140 points)

1 Answer

0 votes
by (216k points)

Hello Jim,

Issue with the built-in Enable for Lync action

When is the Business Rule triggered? We suspect that if the Business Rule is triggered after creating or updating the user, this can be an issue in replication. It is possible that Adaxes performs the changes on one of your DCs, and Lync uses another DC, and the changes simply didn't manage to replicate. Try adding a timeout to your Business Rule before enabling for Lync in order to allow for AD replication. To do this:

  1. Launch Adaxes Administration Console.

  2. Navigate to and select the Business Rule that enables users for Lync.

  3. Right-click the action that enables users for Lync and select Add New Action.

  4. Select the Run a program or PowerShell script action.

  5. In the Script field, type the following:

     Start-Sleep -s 60
    


    This will add a timeout of one minute to your Business Rule.

  6. Enter a short description for the script and click OK.

  7. With the help of the arrow buttons at the bottom, place the Run a program or PowerShell script action before the Enable for Lync action.

  8. Save the Business Rule.

Also, make sure that the users, whom you enable for Lync with the Business Rule, have the Email/Telephone Number property specified.

Issue with the script

The thing is that Adaxes uses PowerShell 2.0, and Lync management cmdlets for Lync 2013 require at least PowerShell 3.0. To workaround the issue, instead of loading the Lync management PowerShell module in your script, you can create a remote PowerShell session to your Lync Server. In such a case, the version of PowerShell used by Adaxes will not matter as the cmdlet will be executed remotely on the Lync Server. The following script enables a user for Lync using a remote PowerShell session:

$lyncServer = "lyncserver.example.com" # TODO: Modify me
$registrarPool = "lyncserver.example.com"  # TODO: Modify me

$sessionOptions = New-PSSessionOption -SkipRevocationCheck -SkipCACheck -SkipCNCheck
$session = New-PSSession -ConnectionUri https://$lyncServer/ocspowershell `
    -SessionOption $sessionOptions -Authentication NegotiateWithImplicitCredential

Import-PSSession -session $session

Enable-CsUser -Identity "%fullname%" -RegistrarPool "lyncserver.example.com" -SipAddress "sip:%mail%"

Remove-PSSession -Session $session

In the script, $lyncServer and $registrarPool specify the FQDNs of your Lync Server and registrar pool.

By the way, we noticed that you use the Set-CsUser cmdlet in your script. This cmdlet is used to modify the properties of the users who are already enabled for Lync. However, the built-in Enable for Lync action only enables new users for Lync. If you are trying to execute the action on a user who is already enabled for Lync, This can also be the cause for the initial issue.

Related questions

0 votes
1 answer

For context, up until now, we had a business rule in place stopping accounts from being created for users with the same name e.g. Jacob Smith and Jacob Smith. This business ... , or how to, if possible, remove this. Any help would be most appreciated! Thanks

asked Oct 22 by Charlie.Evans (70 points)
0 votes
1 answer

Hello, I need to be alerted if the domain administrator account is used to log in any device. Is there a way to do it by recording the last logon time for example ? Thanks you

asked Jan 12 by zemitch (200 points)
0 votes
1 answer

Hi all, I get the error below when enabling a user for Lync. I have opened port 5986 for winrm over https and have verified the correct certificates ... winrm quickconfig -transport:https". For more information, see the about_Remote_Troubleshooting Help topic.

asked May 8, 2017 by joshua.amune (50 points)
0 votes
1 answer

I'm trying to set the adm-ManagedByList attribute on a few hundred groups via powershell, and found that it's only working for groups in our root domain, but fails for all ... is actually located ##'. Am I missing something here or is this a bug? Thanks Felix

asked Sep 19 by felix (150 points)
+1 vote
1 answer

Good morning Support, I'm trying to connect to our AzureAD service as specified in the GetAzureAuthAccessToken(String) section ofCloudServices SDK - https://www.adaxes.com/sdk/ ... m working on a process to simply remove users from Cloud groups. Thank you!

asked Dec 3, 2021 by TheOtherBrian (70 points)
3,549 questions
3,240 answers
8,232 comments
547,814 users