PS Remoting issue

This topic contains 11 replies, has 5 voices, and was last updated by  Adam Bukowski 4 months, 2 weeks ago.

  • Author
    Posts
  • #67720

    Del
    Participant

    I need some help with this.

    I have 4 vms on my computer
    1) Windows Server 2016
    2) Windows Server 2012
    3) Server 2008R2
    4) Windows 10Pro

    I can use PSRemote only on Windows Server 2016.

    I did everything possible to enabled PSremote on all of the other 3 VMs.
    – Upgraded Windows Management Framework on all of the VMs to v5
    – Enable-PSRemoting
    – Get-Service -Name WinRM | Set-Service -StartupType Automatic
    – Enable-PSSessionConfiguration -name Microsoft.Power* -force
    – netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow
    – Set-PSSessionConfiguration -name Microsoft.PowerShell -ShowSecurityDescriptorUI (Checked that I have the proper permissions)
    – Set-WSManQuickConfig -force
    – dir wsman:\localhost\plugin\microsoft*

    Still can't login to any of the 3 VMs, only to the Server 2016 VM. don't know what's missing ?
    Please Advise

  • #67726

    Don Jones
    Keymaster

    It's impossible to say.

    What commands are you running? Are these all in a shared domain? What errors did you get? Are you attempting the connection as an Admin of the remote machine?

    Have you read through "Secrets of PowerShell Remoting" to be sure you understand everything you need to have in place?

    • #67776

      Adam Bukowski
      Participant

      To do:

      Machines are part of domain or not ?

      Please open port 5986 for domain environment.

      Please check if user is part of local Administrator group on remote machines.

      Check for all remote machines

      test-wsman remotemachine


      ADam

    • #67846

      Del
      Participant

      Thanks Don,
      I'm using Enter-PSSession -VMName "DC01"-Credential (Get-Credential) # using an administrative account

      That's the error I'm getting;
      Enter-PSSession : An error has occurred which Windows PowerShell cannot handle. A remote session might have ended.

      the VMs on different domains, with no trust.

      strangely works fine on windows server 2016, but not on the other 3 VMs.

      And thanks for referring this book, "Secrets of PowerShell remoting" reading it right now.

    • #67854

      Adam Bukowski
      Participant

      Hi,
      Did you try to puts -Credential in form domain\user ?

    • #67872

      Don Jones
      Keymaster

      Across domains, that will definitely not work. You need to specify an authentication protocol other than Kerberos, which is the default, and you either need to be using HTTPS (and specify -UseSSL) or mangle your local TrustedHosts. Read the book – there's a lot of coverage on this scenario.

    • #67902

      Del
      Participant

      I'm trying to access the VMs from the Hypeer-V host. Looks like Enter-PSSession -VMName CMDLET doesn't accept -UseSSL parameter. Please advise

    • #67905

      Don Jones
      Keymaster

      O o o o o o. Oh.

      That's not actually "Remoting." That's PowerShell Direct. It relies on the Hyper-V Integration components built into the VM, and I don't think it works earlier than 2016. Sorry – I totally missed -VMName.

    • #67908

      Del
      Participant

      I See, no worries 🙂

      Thank you though.

    • #67954

      Adam Bukowski
      Participant

      From MS Site for Powershell Direct 🙂

      Operating system requirements:
      +
      Host: Windows 10, Windows Server Technical Preview 2, or later running Hyper-V.
      Guest/Virtual Machine: Windows 10, Windows Server Technical Preview 2, or later.

  • #67750

    Adam Bertram
    Moderator

    Moving to correct forum.

  • #67867

    Biswajit
    Participant

    Check the WIMRM listener using below command.
    Winrm e winrm/config/listener

You must be logged in to reply to this topic.