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

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)
+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)
0 votes
1 answer

Hello, Is there a script or something I can use to check if e.g. a custom command is used in e.g. a scheduled task? Just to prevent I delete something that's actively used? Thnx Remco

asked Oct 17, 2018 by RTiel (780 points)
0 votes
0 answers

This issue affects only Adaxes versions that use the Exchange Online Management (EXO v3) PowerShell module: Adaxes 2023.2 - all versions Adaxes 2023 - starting from version 3.15. ... . For more details, see how to Register Adaxes as an app in Microsoft Azure.

asked Jun 23, 2023 by Adaxes (550 points)
3,346 questions
3,047 answers
7,782 comments
544,981 users