Author Posts

May 17, 2017 at 2:18 pm

Hi everyone,

I'm trying to create a new PS Session to localhost just to try it. However I have a problem already at this step.

Yep, I'm obviously using admin account. Any idea what it could be?

PS C:\WINDOWS\system32> New-PSSession -ComputerName localhost

New-PSSession : [localhost] Connecting to remote server localhost failed with the following error message : Access is denied. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ComputerName localhost
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed

Apparently, this problem appears on machines running Windows 10.

May 17, 2017 at 2:27 pm

It could be to do with credentials, try using Get-Credential, sign in and see if it gives you an error?

$C = Get-Credential

New-PSSession -ComputerName localhost -Credential $C

May 17, 2017 at 5:56 pm

Chris, thanks for your answer. I'm sorry I forgot to mention, credentials don't change anything. The same script works fine on Windows 7, but not 10.

May 24, 2017 at 7:56 pm

I had the same issue. You have to go to all the Win10 machines and enable-psremoting. Our course as an Admin.

May 24, 2017 at 9:30 pm

Hello John,

Yes, I enable PS remoting beforehand. So it doesn't solve the issue.