locked
How to enable users with EnterpriseVoice ? RRS feed

  • Question

  • Hi all

    i want to enable all users in OU and enable Enterprise Voice to them automatically:

    Get-CsAdUser -OU "OU=Users,dc=mydomain,dc=com" | Enable-CsUser -RegistrarPool lyncpool.mydomain.com -SipAddressType SAMAccountName -SipDomain mydomain.com | Set-CsUser -EnterpriseVoiceEnabled $True

    but it doesn't works

    users enables successful,  but only PC to PC voice

    where is mistake?

    Thursday, October 13, 2016 7:59 AM

Answers

  • Hi

    You wont be able to pipe the enable-csuser into Set-CsUser in one line.

    When the user is enabled in Lync it takes a few seconds for the backend databases to catch up so it is likely that the object hasn't fully created when the set-csuser is executed.

    When I enable users in this method, i tend to use a foreach loop with a slight pause of one or two seconds between creating objects and modifying them. This is more reliable. Not too much more code something like the below

    $users= Get-CsAdUser -OU "OU=Users,dc=mydomain,dc=com" 
    
    Foreach ($user in $users){
       
         Enable-CsUser $user.userprincipalname -SipAddressType UserPrincipalName -RegistrarPool pool1.domain.com 
    
        Start-Sleep -Seconds 2
    
        Set-CsUser -Identity $user.UserPrincipalName -EnterpriseVoiceEnabled $True -LineURI "tel:+441270212000"
    }
    thanks


    Note: Please remember to `Mark as Answered` a post that answers your question and/or `Vote as Helpful` posts that have helped you. This will help others find answers to similar problems. For more Skype for Business help visit: http://www.skype4b.uk Please note that answers are based on my experience and opinion only and do not necessarily represent the views of my employer.

    Thursday, October 13, 2016 8:14 AM