0

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?

3
  • 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
    Feb 22, 2014 at 21:12
  • Did you enter your user/pass in the command arguments so it would authorize access? Feb 22, 2014 at 22:20
  • No, I have entered it after I received a prompt for password.
    – Nick
    Feb 23, 2014 at 6:54

2 Answers 2

0

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.

7
  • 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.
    – Nick
    Feb 22, 2014 at 21:42
  • @Nick: I'm not quite sure to which service you are refering by writing "RR" and the two RPC services are on "autmatic" or "manual", so will be startet if needed. If your MS Windows is in a default state, the provided directions should be sufficient to enable remote desktop protocol. If you have tinkered with running services before, I'd suggest reseting them to default state.
    – bjanssen
    Feb 23, 2014 at 11:15
  • @Nick: Furthermore, please post how you try to access the remote machine.
    – bjanssen
    Feb 23, 2014 at 11:18
  • pstlist \\Workstation -u MyUser OR tasklist /s Workstation /u MyUser OR tasklist /s <IP> /u MyUser and I always received Access is denied. RR is Remote Registry.
    – Nick
    Feb 23, 2014 at 20:57
  • 1
    My bad. I can't edit my comment, so disregard it.
    – bjanssen
    Jun 30, 2014 at 19:21
0

Both machines should have the same exact account and password to keep it simple. Enabling RDP would help make sure the username and password works, but port 3389 has nothing to do with SysInternals tools.

If windows file and printer sharing are installed on the remote machine, you will probably have everything needed networking wise. Always append **/accepteula** to every SysInternals utility everytime you run it, otherwise pslist will hang waiting for you to press OK when you cannot.

pslist.exe /accepteula -u COMPUTERNAME\localUserOnRemoteMachine \\RemoteMachine

or

pslist.exe /accepteula -u DomainName\DomainUser \\RemoteMachine

You may be running up against UAC or the fact that Windows treats any machine on your LAN as it would another machine on the internet and block any programs from running from intranet machines. Since it does not sound like you are on a ActiveDirectory Domain, i bet a username is not in sync.

psexec.exe gives better error information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .