Enter-PSSession to remote server fails with “access is denied”

Hoi Fong Iam picture Hoi Fong Iam · May 19, 2016 · Viewed 22.3k times · Source

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".

Please help me. enter image description here

Answer

Andrey Marchuk picture Andrey Marchuk · May 19, 2016

You need to provide -Credential parameter:

Enter-PSSession –ComputerName Server –Credential Domain\UserName