I have two computers connected to a router. Both have PsExec in sys32. Files and Printer sharing are enabled and firewall exception is disabled for PsExec.

On first computer in Command Prompt I ran:

psexec -u user \\ cmd

After a while this shows up:

Couldn't access
Access denied

I confirmed that Domain\User is invalid. user is a Administrator on target machine.

What is missing?

Edit: First laptop is running Windows 7 and second is running Windows 8.

  • user is a Administrator...on, correct? This sounds like a firewall issue. Try temporarily disabling the firewall on – I say Reinstate Monica May 6 '17 at 13:39
  • Maybe you need to add the domain name to the user name: -u domain\user – Tobias Knauss May 7 '17 at 7:08
  • @Twisty you are right! So what exact property on Firewall i need to do? I don't want to disable firewall. – Wiszen May 7 '17 at 8:49

On the machine you want to remotely access with PsExec, enable the following Inbound firewall rules in the predefined File and Printer Sharing group:

  • NB-Datagram-In
  • NB-Name-In
  • NB-Session-In

enter image description here

With these rules enabled, users with Administrative permissions on the machine will be able to issue commands remotely via PsExec.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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