Remote Powershell works for one user only

1

I have configured a server to allow PowerShell remote sessions, following more or less this documentation: Remoting into Azure ARM Virtual Machines using Powershell.

On that server I have two users, both inside the Administrators group only.

Using one user I can correctly connect to this remote server, from the second user I receive the error:

Enter-PSSession : Connecting to remote server x.y.w.z 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 -SessionOption (New-PSSessionOption -SkipCACheck -Ski ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (x.y.w.z:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

To connect I use:

Enter-PSSession -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck) -ComputerName x.y.w.z -UseSSL -Credential (Get-Credential)

From both users I can login on the server using RDP and run administrative tasks. The only difference is that I have configured remote powershell with the first user.

Any idea what I'm missing? How can I enable remote powershell for all administrators?

Davide Icardi

Posted 2017-11-07T08:50:07.173

Reputation: 121

1

See if this helps: https://stackoverflow.com/questions/22680211/access-denied-on-remote-winrm.

– root – 2017-11-07T13:09:57.133

Answers

1

I have tried to follow this troubleshooting guide: About Remote Troubleshooting.

Now it seems to works but not sure exactly what of these points solve the problems (maybe running Set-PSSessionConfiguration Microsoft.PowerShell -ShowSecurityDescriptorUI). I have tried many solutions and after some minutes it started to works. I suspect that Windows is caching something and so the solution didn't work immediately.

Davide Icardi

Posted 2017-11-07T08:50:07.173

Reputation: 121