none
Enable-csuser remote execution RRS feed

  • Question

  • 

    
    Hello All, Im working on enabling skype on on-prem server by running enable-csuser remotly, but im  getting below error 
    
    Please help. Error is 
    
    
    
    Cannot bind parameter 'SipAddress' to the target. Exception setting "SipAddress": 
    
    "Active Directory error "-2147016672" occurred while searching for domain 
    
    controllers in domain "<Domain name>": "An operations error 
    
    occurred.
    
    ""
    
        + CategoryInfo          : WriteError: (:) [Enable-CsUser], ParameterBindingEx 
    
       ception
    
        + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.Rtc.Management.AD. 
    
       Cmdlets.EnableOcsUserCmdlet
    
        + PSComputerName       
    

    

    

    Friday, September 27, 2019 2:48 PM

All replies

  • Hi,

    Can provide the completed command?

    In my understanding, there are two methods to remote execution, by administrator tool in remote machine or using Remote  Powershell connection($session = New-PSSession -ConnectionUri https://fe.domain.com/ocsPowerShell).

    For more details about Remote Powershell, please refer to: https://blogs.technet.microsoft.com/ilvancri/2010/11/25/using-remote-powershell-to-connect-to-lync/

    Please check your permission. It is better to add the account to the CsAdministrator and RTCUniversalServerAdmins groups. And try again.


    Best Regards,
    Sharon Zhao


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Monday, September 30, 2019 4:25 AM
    Moderator
  • Hi,

    Is there any update on this case?

    Please feel free to drop us a note if there is any update.

    Have a nice day!


    Best Regards,
    Sharon Zhao


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, October 2, 2019 7:22 AM
    Moderator
  • Hello Sharon,

    Here is the script i'm running. i dont any issue import-pssession to the skype server but when i run the enable-csuser getting an error mentioned.  also the command working on Skype server

    Account is added to both the groups 

    function enable-skypeonline {
        param($user)
        
        $SipAddress = "SIP:" + $User.userprincipalname
        Write-verbose "Enabling User: $SipAddress --> cloud"
        
        if (! $global:skypesession) 
        {
            $global:skypesession = New-PSSession -ComputerName <Skype server name >
            Import-PSSession $global:skypesession -AllowClobber -CommandName enable-csuser,get-csuser,Get-CsAdUser
        }
         $parts = $user.distinguishedname -split ',dc='
        $domain = $parts[1..($parts.count - 1)] -join '.'
               $dc = (Get-ADDomainController -DomainName $domain -Discover).Hostname[0]

            Enable-CsUser -Identity $upn -HostingProviderProxyFqdn "sipfed.online.lync.com" -SipAddress $SipAddress -ProxyPool "<Name>" -DomainController $dc
          
        }


    Wednesday, October 2, 2019 1:33 PM
  • You need to pass credentials & I would use a ConnectionUri not ComputerName.

    e.g.

    New-PSSession -ConnectionUri https://sfbfe01v.x500.co.uk/OcsPowershell -Credential $SfBCredentials

    Thursday, October 3, 2019 8:05 AM
  • Hi,
    Based on your code, “HostingProviderProxyFqdn” parameter is used only for Skype for Business Online. It should not be used on-premises.
    Note the “SipAddress” parameter cannot be used if you are attempting to enable multiple users at the same time.
    Maybe you can try to use the “SipAddressType” parameter instead of “SipAddress” parameter.
    For more details, please refer to this document: https://docs.microsoft.com/en-us/powershell/module/skype/enable-csuser?view=skype-ps

    Best Regards,
    Sharon Zhao


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Monday, October 7, 2019 1:18 AM
    Moderator
  • Hi,

    Do you have any further issue on this topic?

    Meanwhile, if there is no issue, please remember to mark helpful reply as answer to close the thread. Your action would be helpful to other users who encounter the same issue and read this thread.

    Thanks for your understanding.


    Best Regards,
    Sharon Zhao


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, October 15, 2019 1:41 AM
    Moderator