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?