Enabling PowerShell Remoting

suggest change

PowerShell remoting must first be enabled on the server to which you wish to remotely connect.

Enable-PSRemoting -Force

This command does the following:

Only for non-domain environments

For servers in an AD Domain the PS remoting authentication is done through Kerberos (‘Default’), or NTLM (‘Negotiate’). If you want to allow remoting to a non-domain server you have two options.

Either set up WSMan communication over HTTPS (which requires certificate generation) or enable basic authentication which sends your credentials across the wire base64-encoded (that’s basically the same as plain-text so be careful with this).

In either case you’ll have to add the remote systems to your WSMan trusted hosts list.

Enabling Basic Authentication

Set-Item WSMan:\localhost\Service\AllowUnencrypted $true

Then on the computer you wish to connect from, you must tell it to trust the computer you’re connecting to.

Set-Item WSMan:\localhost\Client\TrustedHosts '192.168.1.1,192.168.1.2'
Set-Item WSMan:\localhost\Client\TrustedHosts *.contoso.com
Set-Item WSMan:\localhost\Client\TrustedHosts *

Important: You must tell your client to trust the computer addressed in the way you want to connect (e.g. if you connect via IP, it must trust the IP not the hostname)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents