Skip to content

Instantly share code, notes, and snippets.

@hdeshev
Created March 16, 2012 18:42
Show Gist options
  • Save hdeshev/2051736 to your computer and use it in GitHub Desktop.
Save hdeshev/2051736 to your computer and use it in GitHub Desktop.
Enable PowerShell remoting

Setting up PowerShell remoting.

First, you need to install PowerShell version 2.

Enabling remoting on the server machine

Log in to the server machine, start PowerShell as an administrator and execute:

Enable-PSRemoting

Answer Y to all questions.

Allowing the client to connect to everybody

By default PowerShell can't connect to arbitrary hosts. You need to allow that. Here are the commands:

cd WSMan:\localhost\Client
Set-Item TrustedHosts *
Restart-Service WinRm

This one says that we can connect to (trust) all hosts (*).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment