pssession

This topic contains 10 replies, has 2 voices, and was last updated by  Dave Wyatt 3 years, 9 months ago.

  • Author
    Posts
  • #13280

    Jason Wheeler
    Participant

    I'm attempting to use PSSESSION from a computer that has PS Version 3 to a computer that has PS Version 2.0 but I am unable. I have been able to use PSSESSION from a 2.0 to a 2.0 with no problem. Leads me to believe I am unable to use PSSESSION from newer version of powershell to a 2.0 version, is this true? or am I doing something wrong?

    I have ran enable-psremoting on all PCs – All my firewalls are completely off

    This is all done in my virtual lab. I wanted to do some testing on it before enabling remoting on my production domain.

    Thanks in advance

  • #13281

    Dave Wyatt
    Moderator

    Check your WSMAN ports on the 2.0 machine; the defaults changed from 80 (HTTP) and 443 (HTTPS) to 5985 (HTTP) and 5986 (HTTPS) to avoid conflicts with web servers. See http://blogs.msdn.com/b/wmi/archive/2009/07/22/new-default-ports-for-ws-management-and-powershell-remoting.aspx for more information on how to check and reconfigure this.

  • #13283

    Jason Wheeler
    Participant

    Thanks for the reply

    Read the blog that you posted, I checked the ports and everything seems to be fine. Still not working. I can get from the Win7 desktop to Win7 desktop, from Win7 desktop to 2012 server, but I am unable to get from my 2012 server to either of my Win7 desktops. They are all on the same domain, I am logged in using domain admin, and I have all the firewalls disabled.

  • #13284

    Dave Wyatt
    Moderator

    What error messages are you getting?

  • #13286

    Jason Wheeler
    Participant

    new-pssession : [win7desktop02] Connecting to remote server win7desktop02 failed with the
    following error message : WinRM cannot complete the operation. Verify that the specified computer
    name is valid, that the computer is accessible over the network, and that a firewall exception
    for the WinRM service is enabled and allows access from this computer. By default, the WinRM
    firewall exception for public profiles limits access to remote computers within the same local
    subnet. For more information, see the about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + new-pssession win7desktop02
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-
    PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : WinRMOperationTimeout,PSSessionOpenFailed

  • #13287

    Jason Wheeler
    Participant

    Not sure if this will help, but the results from winrm e winrm/config/listener

    PS C:\Windows\system32> winrm e winrm/config/listener
    Listener [Source="GPO"]
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 10.10.0.10, 127.0.0.1, 192.168.1.115, ::1, fe80::5efe:10.10.0.10%13, fe80::5efe:
    192.168.1.115%18

    Listener [Source="Compatibility"]
    Address = *
    Transport = HTTP
    Port = 80
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 10.10.0.10, 127.0.0.1, 192.168.1.115, ::1, fe80::5efe:10.10.0.10%13, fe80::5efe:
    192.168.1.115%18

    Listener [Source="Compatibility"]
    Address = *
    Transport = HTTPS
    Port = 443
    Hostname = INFRADC01.Wheeler.loc
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 10.10.0.10, 127.0.0.1, 192.168.1.115, ::1, fe80::5efe:10.10.0.10%13, fe80::5efe:
    192.168.1.115%18

    Thanks again in advance for any help.
    Jason

  • #13288

    Dave Wyatt
    Moderator

    The listener configuration on the domain controller is irrelevant, in this case. What do you get when you run that command on win7desktop02?

    The error message you're getting is a simple failure to connect. It could mean you've either got a name resolution or IP connectivity issue, but that seems unlikely in this case. Most likely, either WSMAN isn't listening on port 5985 on win7desktop02 (which the winrm command will tell you), or you've still got a firewall blocking that traffic somewhere.

  • #13292

    Jason Wheeler
    Participant

    after looking a little closer, it has to have something to do with my lab network. I am unable to ping win7desktop02 from my 2012 server, which is also the DC/DNS server. I will have to track that piece down and get it fixed.

    Thanks

  • #13293

    Jason Wheeler
    Participant

    to clarify, I can ping win7desktop but not by the hostname, only by IP address.

  • #13295

    Jason Wheeler
    Participant

    I swear I don't get it.

    I can't ping win7desktop02 from my DC/DNS server but I can from my FS01 (another 2012 server). I can also use new-pssession while on FS01 also so it's obviously nothing to do with the powershell or winrm configuration.

    Not entirely sure why my DC/DNS can not resolve the desktop by name.

  • #13296

    Dave Wyatt
    Moderator

    I don't really have enough information to answer that, at this point. For a start, what's the output from "ipconfig /all" on the DC, win7desktop02 and FS01?

You must be logged in to reply to this topic.