PowerShell command prompt

Remotely Run PowerShell on a Cluster

Q: I'm trying to remotely run PowerShell commands on a node in a cluster, but the commands aren't working because of an authentication problem. Why?

A: When a PowerShell command is executed on a remote server, your credentials are used to perform actions on that remote box. In order to protect the use of your credentials, a remote server can't then use the credentials it was passed on another server, which would create a double-hop of credential usage. When you run cluster commands, all nodes in the cluster are communicated with to perform actions—which will fail because the cluster node you remotely connected to doesn't have the rights to use the credentials on other nodes in the cluster.

There are several ways to solve this problem. The simplest approach is to use CredSSP and configure the server to which you're connecting to allow the use of CredSSP.

On the local machine that will issue the commands, run:

Enable-WSManCredSSP Client -DelegateComputer <remote server name> -Force

On the remote server that will receive the commands, run:

Enable-WSManCredSSP Server

Then when running the remote commands, use the following:

$CustomCred = Get-Credential #Stores a credential to use and you will be prompted on screen
Invoke-Command -ComputerName <destination computer> -ScriptBlock {remote stuff} -Authentication Credssp -Credential $CustomCred
TAGS: Windows 8
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.