Cannot create remote powershell session after Enable-PSRemoting

前端 未结 7 829
别跟我提以往
别跟我提以往 2021-01-30 23:45

I can not remote into any machine to save my life! I have tried everything I can find. If anyone could troubleshoot or guide me, I\'d appreciate it as this would be a great tool

7条回答
  •  梦谈多话
    2021-01-30 23:58

    I have achieved a remote session with Enter-pssession command, had to follow these exact parameters

    $creds =  get-credential (the -credential parameter in enter-pssession does not work properly, thus u must         previously enter the object at another variable)
    Enter-pssession -computername wsustest -authentication Default -credentials $creds
    

    i Also had to set both client and remote server in the trusted hosts wsman: space

    another solution which surely wouldve worked but i havent tried, wouldve been setting https: which is harder to do.

    thx to all, your comments certainly led to the solution!

提交回复
热议问题