On the server , open powershell and type
New-PSSession -ComputerName localhost
A new PSSession is created in the local computer, Get-PSSession returns the session information correctly.
Now go to another computer (client), and open Powershell and type
Get-PSSession -ComputerName -UseSSL -Port 5986 -Credential (Get-Credential) -SessionOption (New-PSSessionOption -SkipRevocationCheck)
Nothing is returned (returns $null)
I’m 100% positive WinRM is set up properly and the firewall is not blocking access. To verify this:
On the client computer, type
New-PSSession -ComputerName -UseSSL -Port 5986 -Credential (Get-Credential) -SessionOption (New-PSSessionOption -SkipRevocationCheck)
and I can see that the session is created successfully on the server.
And now go to another client computer (client2), and type
Get-PSSession -ComputerName -UseSSL -Port 5986 -Credential (Get-Credential) -SessionOption (New-PSSessionOption -SkipRevocationCheck)
and I see that the session info is returned correctly.
To summarize:
- A PSSession launched into the server, from the server (loopback) is
not visible to client computers, only visible to the server. - A PSSession launched into the server, from the client is not visible to
the server, but it is visible to all client computers.
Why?