When I am logged in as the same user
as the server, I can Enter-PSSession
with:
> Enter-PSSession -ConnectionURI http://xxx.xx.xxx.xx:5985
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 http://xxx.xx.xxx.xx:5985 -Credential user
After I enter the password, I get:
Enter-PSSession : Connecting to remote server xxx.xx.xxx.xx 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 http://xxx.xx.xxx.xx:5985 -Credential user
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (http://xxx.xx.xxx.xx:5985/:Uri
) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed