locked
Unable to Enter-PSSession to remote VM which is not in domain RRS feed

  • Question

  • I tried all solution i saw online.

    on the VM i dd "Enable-PSRemoting -Force"

    then when i use  "Get-Service winrm" i get the service is running.

    i also used winrm s winrm/config/client '@{TrustedHosts="$local machine"}' at the VM and "Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force"

    on the local machine i use the command "Enter-PSSession -ComputerName $RemoteComputer -Credential $Creds"

    and get:

    Enter-PSSession : Connecting to remote server VM01 failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
    At line:8 char:1
    + Enter-PSSession -ComputerName $RemoteComputer -Credential $Creds
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (VM01:String) [Enter-PSSession], PSRemotingTransportException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
     


    • Edited by yosi desta2 Wednesday, October 3, 2018 8:27 AM
    Wednesday, October 3, 2018 8:26 AM

All replies

  • Hi,

    If the remote computer is not in a trusted domain (for example WORKGROUP), the remote computer might not be able to authenticate your credentials.

    To enable authentication, you need to add the remote computer to the list of trusted hosts for the local computer in WinRM.

    To do so, type: 

    winrm s winrm/config/client '@{TrustedHosts="RemoteComputer"}'

    When you are working with computers in WORKGROUPs or HOMEGROUPs, you must either use HTTPS as the transport or add the remote machine to the TrustedHosts configuration settings.

    If you cannot connect to a remote host, verify that the service on the remote host is running and is accepting requests by running the following command on the remote host: 
    winrm quickconfig

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Wednesday, October 3, 2018 8:50 AM
  • Hi,

    Was your issue resolved? 
    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    Best Regards,

    Lee


    Just do it.

    Friday, October 26, 2018 8:38 AM
  • Hi,

    As this thread has been quiet for a while, we will mark it as ‘Answered’ as the information provided should be helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.

    Best Regards,

    Lee


    Just do it.

    Monday, November 5, 2018 9:19 AM