Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have got two machines (machine1 & machine2). My task is to execute few commands remotely via PSEXEC from machine1 to machine2. Sadly these machines are from different network domains. Admin Share is enabled in both the machines.

machine2 can be accessible only by establishing to VPN on machine1. PSEXEC works fine when I establish VPN on the machine1 to access machine2. I am also able to access Admin share via run ---> \\ip\Admin$

Tricky part here is to execute the PSEXEC without establishing VPN on machine1. To achieve this I have disabled the firewalls on machine2. Now without VPN, I can connect machine2 from machine1 via RDP (Remote Desktop), but not able to successfully run PSEXEC nor able to access Admin share on machine2.

Below is the command/error:

Command: PSexec \\{machineip} -u {username} -p {password} cmd


Could not access {machineip}
The network path was not found

Guess as Admin share on machine2 is not accessible without Establishing VPM PSEXEC fails to execute. If the above guess is valid, I would like to know how to access Admin Share from a different domain/network.

share|improve this question

migrated from Oct 9 '12 at 7:17

This question came from our site for professional and enthusiast programmers.

Can anyone have a look..? if any additional info needed ..please comment – navger Oct 7 '12 at 14:10
Added an answer, but don't do this. Try telling us what you're trying to do here/why you can't have the VPN established, and maybe we can figure out a way to do whatever it is without making your machine so incredibly insecure. – HopelessN00b Oct 9 '12 at 11:00
up vote 0 down vote accepted

It's fairly uncommon (and unsafe) to open up file sharing to the internet, which is what it looks like you're trying (or expecting) to do. PSExec operates over ports 445 and 139, and I'd expect that one or both of those ports are being blocked by one or both of the edge devices on the two networks at play here.

And PSExec does require that you be able to access the administrative share to work.

So basically, the way you'd connect to a remote machine via PSExec is to open up ports 445 and 139 on the [hardware] firewall(s), establish a NAT rule (if needed), and then use the command normally.

However, do NOT actually do this, as opening up port 139 to the world is about the worst thing you can do.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.