locked
WinRM PSsession -ConnectionUri questions RRS feed

  • Question

  • Hello, i try to do powershell script for automation to my lync server - the URL of admin console is: https://lync15.mydomane.com

    server is: lync15.mydomane.com

    Local machine: machine1.mydomane.com

    I'l try to connect from machine1 to https://lync15.mydomane.com (my admin console of Lync on my server lync15.mydomane.com)  from powershell

    New-PSSession -ConnectionUri "https://lync15.mydomane.com" -Credential domane\Admin

    and have arror 

    New-PSSession : [lync15.mydomane.com] Connecting to remote server lync15.mydomane.com failed with the following error message : The WinRM client sent a
    request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually returned by a HTTP server that does not support the
    WS-Management protocol. For more information, see the about_Remote_Troubleshooting Help topic.

    On my server i check ports 5985 (http), its opened, i opened 5986 (default https port) try telnet from machine1 to server lync15 and its working (both ports). I add to trust computers my lync15.mydomane.com on machine1

    Try to desable ipv6 (as one of solutions)

    Try to change policy in 

    Computer Configuration\Policies\Administrative Templates\Windows Components\Windows Remote Management\WinRM Service\Allow remote server management through WinRM

    I also have Listeners on my lync15.mydomane.com (winrm e winrm/config/listener)

    Listener
        Address = *
        Transport = HTTP
        Port = 5985
        Hostname
        Enabled = true
        URLPrefix = wsman
        CertificateThumbprint
        ListeningOn = IPV4, 127.0.0.1, ::1, IPV6
    Listener
        Address = *
        Transport = HTTPS
        Port = 5986
        Hostname = lync15.mydomane.com
        Enabled = true
        URLPrefix = wsman
        CertificateThumbprint = e4 ................................................... aa
        ListeningOn = IPV4, 127.0.0.1, ::1, IPV6

    I also can connect to my server by this:

    Enter-PSsession -ComputerName lync15.mydomane.com -Credential mydomane\Admin

    What am I doing wrong?

    Thursday, February 7, 2019 12:17 PM

All replies