Enter-PSSession : Connecting to remote server failed with the following error message

On the remote computer:

  1. In: Control Panel\Network and Internet\Network and Sharing Center
    Make sure the remote computer is not in the public location, but set it to work or private
  2. Start PowerShell in administrator mode and enter the command:
    Enable-PSRemoting
    exit
  3. Go to Control Panel -> System and Security ->Windows Firewall and click advanced Settings
    Add the ip-range of your managing computer to windows remote management(http-In) both in the private and in the domain inbound rules.

On the managing computer:

  • Start PowerShell in administrator mode and enter the command:

    Set-Item WSMan:\localhost\Client\TrustedHosts -Concatenate remotecomputer.domain.suffix -Force

    using your complete remote computer’s network path. This adds the remote computer network name to your trusted hosts.

That should do the trick.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s