Connect to Network OR Remote machine

Welcome Forums General PowerShell Q&A Connect to Network OR Remote machine

This topic contains 5 replies, has 3 voices, and was last updated by

 
Participant
2 years, 3 months ago.

  • Author
    Posts
  • #48525

    Participant
    Points: 0
    Rank: Member

    Hi,

    I have the below query pertaining to the establishment of connection between my machine(local) and Remote machine / Network machine.Can someone please let me know how to proceed on this.

    I have tried New-PSSession, Create-PSSession, Enable-PSSRemoting, Enter-PSSession etc commands to establish the connection with my remote machine in one instance and with peer network machine in another instance. In both the cases, I have got the execution failed with error message 'Access denied' despite the fact that I have run the PowerShell in Administrator mode.

    Can someone please help me break this issue?

  • #48532

    Participant
    Points: 20
    Rank: Member

    is the account your running the PS window under and admin or remote user of the machine your connecting to ?

    • #48538

      Participant
      Points: 0
      Rank: Member

      Hi,

      I have tried the below scenarios:-

      1. Connecting to my colleague's machine ( using his computer name and this is not listed on network)
      2. Connecting to the machine that is listed on Network and sharing computers
      3. Connecting to remote machine. (The machine on which we have our application deployed code)

      In all the above scenarios, I have got 'Access denied' message despite running the Powershell 4.0 version in administrator mode.

  • #48546

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

    I'd suggest reading "Secrets of PowerShell Remoting," which is on our eBooks menu.

    Unless the machines are all in the same domain, you have to take several additional steps to successfully connect. The book outlines the steps for connecting between non-domain machines.

    And running "as Administrator" doesn't do anything special in this case. Even in a domain environment, you need to be using an account that the remote machine recognizes as an administrator of itself. And again, in a non-domain environment, you have to take additional steps.

  • #48548

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

    And I should also point out that "listed on Network" (I'm not sure what that means) has nothing to do with it, either. "Access denied" means your computer is "finding" the remote machine just fine, but isn't being allowed to connect. Additionally, PowerShell Remoting obviously needs to be enabled on whatever machine you connect to, and it isn't enabled by default on client operating systems. The book does walk through all of that, and it'll help you understand what the protocol is actually trying to do. It's worth the time to read.

  • #51065

    Participant
    Points: 0
    Rank: Member

    Thanks Jones!

    yeah, sure.
    I will go through the content.
    Apology for the late response. I was out of station.

The topic ‘Connect to Network OR Remote machine’ is closed to new replies.