Hello! I’m getting the following error when trying to establish a remote PS session.
New-PSSession : [webd3] Connecting to remote server webd3 failed with the following error message : Access is denied.
For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:12
+ $session = New-PSSession -ComputerName webd3 -Credential (Get-Credent …
+ CategoryInfo : OpenError: (System.Manageme…RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
+ FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed
On the remote server (WS 2019 Std. Hyper-V VM - “webd3”):
- The WinRM service is running and set to 'Automatic'
- The WinRM port is open in the firewall
- PS Remoting is enabled
- I've tried the script with both the computer name and the local IP address
On the local laptop (Windows 10):
- Trusted hosts list allows all (*)
- I'm running PS as an admin
- Using this (which worked on $session = New-PSSession -ComputerName webd3 -Credential (Get-Credential)
Any idea what I’m missing?
I’d also note that I was able to establish remote PS session with the VM’s host OS (WS 2019 Std. non-desktop experience).