PS Remoting issue

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

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?

Moving to correct forum.

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

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.

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

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

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.

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

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.

I See, no worries :slight_smile:

Thank you though.

From MS Site for Powershell Direct :slight_smile:

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.