I want to use winrm remote vm, I can connect to the localhost, but I can't connect to the other remote machine, the error is "access is denied".
You need to provide -Credential
parameter:
Enter-PSSession –ComputerName Server –Credential Domain\UserName