How to get a new-pssession in PowerShell to talk to my ICS-connected laptop for Remoting
Posted
by Scott Bilas
on Server Fault
See other posts from Server Fault
or by Scott Bilas
Published on 2010-06-02T17:20:10Z
Indexed on
2010/06/02
17:25 UTC
Read the original article
Hit count: 380
powershell
|remoting
If I have my laptop on the LAN, then Powershell remoting works fine from my workstation to the laptop. However, the LAN is wireless, and so sometimes I will connect on a wire to my workstation. It has two ethernet ports so I have the secondary wired up to share to the laptop using Win7's Internet Connection Sharing. (Btw I know that avoiding ICS would solve the problem, but that's not an option right now.)
So my question is: what magic registry bits or command line options do I need to flip to get remoting to work to my laptop through ICS?
Here's what happens when I try it:
new-pssession -computername 192.168.137.161
[192.168.137.161] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. Default authentication may be used with an IP address under the following conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information on how to set TrustedHosts run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportException + FullyQualifiedErrorId : PSSessionOpenFailed
I'm having a hard time understanding the documentation for PowerShell and WinRM. I've tried messing with allowing ports in the firewall and setting TrustedHosts to * on my workstation (don't think this is a good idea on the laptop).
I have no idea where to go from here, would appreciate any help.
© Server Fault or respective owner