Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I am logged in as the same user as the server, I can Enter-PSSession with:

> Enter-PSSession -ConnectionURI

However, when I'm logged in as a different user (on the same machine) and try to Enter-PSSession with -Credential parameter:

> Enter-PSSession -ConnectionUri -Credential user

After I enter the password, I get:

Enter-PSSession : Connecting to remote server failed with the
following error message : Access is denied. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -ConnectionUri -Credential user
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (
  ) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
share|improve this question
up vote 5 down vote accepted

(1) You can skip the http:// stuff if you're using the default WinRM configuration and instead of:

Enter-PSSession -ConnectionURI

enter the following:

Enter-PSSession xxx.xx.xx.xx

You can also use the server's DNS name instead of its IP if there's an DNS entry for the system.

(2) By default only members of the administrator group are allowed to connect to PS remoting endpoints. Are you sure your account is a member of that group?

(3) I read somewhere that the -Credential parameter of Enter-PSSession is broken. The workaround is to create the credential object beforehand:

$cred = Get-Credential

Enter-PSSession XXX.XX.XX.XX -credential $cred

Please try that and report whether it works.

(4) If you are trying to connect to a machine that is not part of your domain you need to add it to the list of trusted computers on the computer you are trying to start the remoting session from:

winrm s winrm/config/client '@{TrustedHosts="RemoteComputerName"}'

And you need to explicitly tell enter-pssession which user account on the remote machine will be used:

$Cred = Get-Credential "remotecomputername\username"

Enter-PSSession XXX.XX.XX.XX -Credential $Cred

share|improve this answer
Which account you are talking about? Both server (joon) and current logged in accounts are administrator accounts. – joon Jan 1 '14 at 12:28
I assume both users are AD accounts with local admin privileges, is that correct? – megamorf Jan 1 '14 at 12:31
Yes it is. Both users are AD accounts with local admin privileges – joon Jan 1 '14 at 12:32
Please take a look at (3) of my answer. – megamorf Jan 1 '14 at 12:42
I tried (3), but the result was the same. – joon Jan 1 '14 at 13:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.