remoting problem in powershell RRS feed

  • Question

  • hi.

    i will test a remoting powershell in host and vm(virtual box - win 7 - bridge net), but i have problem.

    i use this command in vm:

    PS C:\Windows\system32> New-PSSession -ComputerName vmwin7 -Credential miragehost
    [vmwin7] Connecting to remote server failed with the following error message : The WinRM client cannot process the requ
    est. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then
     HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use w
    inrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can ge
    t more information about that by running the following command: winrm help config. For more information, see the about_
    Remote_Troubleshooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
        + FullyQualifiedErrorId : PSSessionOpenFailed

    and i want to add trustedhost :

    PS C:\Windows\system32> Set-Item WSMan:\localhost\client\trustedhosts -Value *
    WinRM Security Configuration.
    This command modifies the TrustedHosts list for the WinRM client. The computers in the TrustedHosts list might not be
    authenticated. The client might send credential information to these computers. Are you sure that you want to modify
    this list?
    [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
    Set-Item : Access is denied.
    At line:1 char:9
    + Set-Item <<<<  WSMan:\localhost\client\trustedhosts -Value *
        + CategoryInfo          : NotSpecified: (:) [Set-Item], InvalidOperationException
        + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.SetItemCommand

    and i want to remote from host to vm :

    New-PSSession -ComputerName miragehost -Credential vmwin7
    New-PSSession : [miragehost] Connecting to remote server miragehost failed with the following error message : Access
    is denied. For more information, see the about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ComputerName miragehost -Credential vmwin7
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
        + FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed

    powershell run adminstrator level.

    what is problem and how to fix it ?

    Wednesday, May 16, 2018 8:53 AM

All replies

  • Only an administrator can do these things.


    • Proposed as answer by I.T Delinquent Wednesday, May 16, 2018 9:18 AM
    Wednesday, May 16, 2018 9:16 AM
  • powershell run adminstrator level.(vm and host)
    Wednesday, May 16, 2018 9:19 AM