When I try to PsExec to a remote machine using PsExec \\machine -u domain\user -p pass PsExec shows the following error message:

The handle is invalid.
Couldn't access machine:
Completed in 0.426s

However domain\user can remote login to \\machine with no problem. Any ideas how can I let domain\user PsExec into that machine as well.


Try the following:
Start > Run > Type \machine\c$
In the dialog box that opens type domain\user and password

If you can't log in to the administrative share (c$) of the remote machine with that particular user ID, it means it does not have administrative rights, and therefore, no permission to execute on that machine.

If you can log in, try running PSList first, to verify that the process handle exists.

| improve this answer | |

Maybe you have reached the maximum number of connections allowed by the "Server" windows service, try restarting it.

You can see the number of sessions in use with this command:

net statistics server

It happened me in Windows 7 Professional to have lots of active sessions and was giving the "The handle is invalid." message in Psexec

| improve this answer | |

Restarting Netlogon service helped to solve my issue

| improve this answer | |
  • Can you please add some details, clarifications – Romeo Ninov May 22 '17 at 10:24
  • How did you restart the service? – Mokubai May 22 '17 at 10:37
  • Solved it for me too - on your server Press WIN + R, enter services.msc, select "Netlogon" and press Restart. – Acroneos Sep 8 at 15:16

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.