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.

4 Answers 4


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.


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


Restarting Netlogon service helped to solve my issue

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

Open "Registry Editor" on your remote server Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System Add a new DWORD value: LocalAccountTokenFilterPolicy Set LocalAccountTokenFilterPolicy = 1 Reboot the remote machine.

  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jul 11 at 12:00

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.