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 am working on PsExec but i get error as "Access Denied " Firewall is disabled on both machine. Ports are also open at both machine.

C:\PSTOOLS>PsExec \\ -u Administrator "c:\test\sample.bat Shailesh"

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals -


Couldn't access
Access is denied.
share|improve this question
Did you omit the second \ in \\ in the command line too? the command should be psexec \\ -u administrator "c:\test\sample.bat Shailesh" – john Aug 5 '13 at 7:24
Also, when you say the firewall is disabled, do you mean "the service is disabled" or "the firewall is passing all traffic"? – john Aug 5 '13 at 7:26
Firewall service is disabled. Also have given command as psexec \\ -u administrator "c:\test\sample.bat Shailesh" but its not working. – Shailesh Sutar Aug 5 '13 at 7:32
Disabling the firewall service can cause all sorts of problems, since windows effectively doesn't know what to do so it just blocks the traffic. Try enabling the firewall service but switching the firewall into passive mode (basically turn it off). – john Aug 5 '13 at 8:04
and what exactly makes you think firewalls have anything to do with this problem? – tony roth Aug 5 '13 at 18:33

If this is not related to the firewall, which it sounds like it's not, and you definitely have the correct admin password for the remote machine, then check the following:

  • File and Print Sharing is enabled on the remote (and possibly local) machine.
  • The admin$ share of the remote machine exists and is accessible.

The following article is quite a lengthy explanation of how psexec can work, by Mark Russinovich (creator of the sysinternals suite).

share|improve this answer
File and Print Sharing service and Admin$ share is enabled on the remote machine. But i do not have DC Configured in my premises for windows systems. – Shailesh Sutar Aug 7 '13 at 7:11
This should work regardless of whether or not there is a DC available, since you are using a local administrator account. – john Aug 7 '13 at 7:20

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.