none
Enable-CsComputer : The term 'Enable-CsComputer' is not recognized as the name of a cmdlet - Remote PowerShell RRS feed

  • Question

  • Hi

    I need to add/update 'Simple Urls' for few sip domains. For which I have to run 'Enable-CsComputer' command from a remote server.
    I have connected to Skype for Business Server using Remote PowerShell session. But when I run 'Enable-CsComputer' command, I get the following error.

    Enable-CsComputer : The term 'Enable-CsComputer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
    included, verify that the path is correct and try again.
    At line:1 char:1
    + Enable-CsComputer
    + ~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Enable-CsComputer:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

    I am using the following script to connect to remote powershell session.

    $so = New-PSSessionOption -SkipCACheck:$true -SkipCNCheck:$true -SkipRevocationCheck:$true $session = New-PSSession -ConnectionUri "https://lync.domain.local/OcsPowerShell" -Credential $cred -SessionOption $so Import-PSSession $session


    How to run 'Enable-CsComputer' command remotely?


    Rizwan Ahmed. Software Engineer - Microsoft Lync | Exchange | SharePoint | Blackberry Enterprise Server | .NET


    • Edited by itsrizi Wednesday, September 6, 2017 2:45 PM
    Wednesday, September 6, 2017 12:44 PM

All replies

  • Not a direct answer, but there are a few Lync\Skype commands (I'm not sure this is one) that act up when using remote PowerShell and only seem to work when run directly on a Lync\Skype server.  I typically just RDP in for larger tasks that would require running a command like enable-cscomputer. 

    Please remember, if you see a post that helped you please click "Vote" on the left side of the response, and if it answered your question please click "Mark As Answer". SWC Unified Communications This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, SWC, their employees, or other MVPs.

    Wednesday, September 6, 2017 3:30 PM
  • Try this:

    Import-PSSession $session -AllowClobber

     
    Wednesday, September 6, 2017 4:07 PM
  • Hi itsrizi,

    Agree with others

    As a supplement, I will share a document about managing Microsoft Lync Server 2010 Using Remote PowerShell, it’s similar to SFB server 2015

    https://blogs.technet.microsoft.com/csps/2010/06/16/quick-start-managing-microsoft-lync-server-2010-using-remote-powershell/

    http://www.skypeadmin.com/2014/06/12/quicktip-remote-lync-powershell-connections/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    Regards,

    Alice Wang


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Thursday, September 7, 2017 2:46 AM
    Moderator