6

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.

Behrang
  • 2,032
  • 5
  • 19
  • 26

4 Answers4

3

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.

Traveling Tech Guy
  • 9,918
  • 8
  • 35
  • 40
  • c$ is not the administrative share it's a drive share... \admin$ is the administrative share. – Colyn1337 May 02 '14 at 15:00
  • Actually, C$ (or every volume letter followed by a $) is considered an administrative share: https://en.wikipedia.org/wiki/Administrative_share#Share_names – Traveling Tech Guy May 03 '14 at 11:46
1

Restarting Netlogon service helped to solve my issue

1

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

0

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](/help/how-to-answer). – Community Jul 11 '22 at 12:00