Wednesday, February 16, 2011

Enable PowerShell Remoting

On the remote machine, start a Administrator PowerShell session and run following commands:

cd wsman:
cd localhost\client
set-item trustedhosts *

Just answer "Y" for any prompt.

To start a remote Powershell session, on your local PowerShell session, enter:

Enter-PSSession <the-remote-machine-hostname>

For some reason, Enter-PSSession can't seems to resolve DNS aliases (CNAME records) and you'll get the following error if you used it instead of the hostname.

Enter-PSSession : Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.