1
votes

A Proxy server is used for the LAN connectivity in my machine and when i try to create a remote powershell session using the command Enter-PSSession in my machine, powershell console throws the following exception,

First Try: Enter-PSSession -ComputerName server.com -Credential domain\user

Now, I tried along with -UseSSL option. Below is the exception i received this time,

Second Try: Enter-PSSession -ComputerName server.com -Credential domain\user -useSSL

Can anyone please let me know how to create remote powershell session when in proxy LAN connection ?

1

1 Answers

1
votes

In order to set proxy settings on connections for PS Remoting, use the New-PSSessionOptions commandlet and save the results as an object. $sessionOptions = New-PSSessionOptions [...] (you may need to research the options to specify there)

Then, use this object as a parameter on the -SessionOptions switch