Windows 7, how to configure/allow remote cmd access to specific PC/IP address from the local network?

5,828

To achieve your desired goal, you need to take two distince steps.

First, enable the Remote Desktop Protocol. Unfortunately there is no simple way to do this, so I will describe the path through the GUI. Open the control panel -> System and Security -> System -> Remote Settings -> Remote tab. Select any of the "Allow connections from...". If you like, limit it to certain users. Otherwise only administrator accounts will have access.

Microsoft offers a more involved how-to, Tip: Configure Remote Desktop Access on Windows 7 Systems.

Next, configure your firewall. Fortunately you can configure it through the command line interface. Open a command line interface with administrator rights and enter:

netsh advfirewall firewall add rule name = "Remote Desktop" Dir = in action = allow protocol = TCP localport = 3389 remoteip=192.168.0.111/24

Of course, replace the remoteip with the right one. You can read more about netsh in How to use the "netsh advfirewall firewall" context instead of the "netsh firewall" context to control Windows Firewall behavior in Windows Server 2008 and in Windows Vista.

Share:
5,828

Related videos on Youtube

Nick
Author by

Nick

Updated on September 18, 2022

Comments

  • Nick
    Nick over 1 year

    In Windows 7, how do I configure/allow remote command prompt access to specific PC or IP address from the local network?

    LE:

    PsList gave me: "Access is denied."

    Firewalls are on both PCs, off. RPC and Remote Registry services are started on the target PC. Both are running Windows 7, and the target PC has password protected account.

    The PCs are in the same network, behind a router. The ping is working between the PCs.

    Do I need to set Workgroups, Domains, etc.?

    What else could I do?

    • Nick
      Nick about 10 years
      Tasklist and PsList, but I could not manage to login, and nor have I set the required filtering, in order to give access only to specific PC/IP.
    • Nick
      Nick about 10 years
      No, I have entered it after I received a prompt for password.
  • Nick
    Nick about 10 years
    I've tested the following: Firewall on target PC off, RPC and RR services on. Remote settings->"Allow connections from computers running any version of Remote Desktop". I have not specified a certain user here. I have not fiddled with Workgroups. The PCs are in the same network, behind a router. The ping is working between the PCs. Result: Access is denied.
  • bjanssen
    bjanssen about 10 years
    @Nick: Furthermore, please post how you try to access the remote machine.
  • bjanssen
    bjanssen about 10 years
    First, try connecting with a user account that exists on the remote machine AND has administrator privileges there. Second, try to establish a direct rdp-connection with the mstsc.exe command.
  • rjt
    rjt almost 10 years
    He is clearly referring to the sysinternals command line tools, not RDP.
  • bjanssen
    bjanssen almost 10 years
    My bad. I can't edit my comment, so disregard it.