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?

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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