The solution for 2.30+ is to add the -i flag for interactive session.
PsExec: Logon failure: the user has not been granted the requested logon type at this computer.
Hello,
I am trying to run the following command within a domain using an account with Domain Admin on to computers within the domain:
psexec64 @Phil .txt -u domain\adminaccount "\server\share\file.cmd"
I enter the password when prompted and PsExec attempts to connect to the hostnames in my .txt but it just returns:
PsExec could not start \server\share\file.cmd on COMPUTERNAME
Logon failure: the user has not been granted the requested logon type at this computer.
I would appreciate your assistance.
Thank you.
4 answers
Sort by: Most helpful
-
-
Mike Diack 46 Reputation points
2021-01-19T08:44:57.303+00:00 Its due to a bug in psexec 2.32 (the current version). I've raised this already, but please add your voice to it. The previous version (2.20) works fine.
-
mariora 371 Reputation points
2021-01-17T15:29:00.7+00:00 PSEXEC tries to connect to the Admin$ share of the remote computer, in order to copy on the remote machine the PSEXecSVC.exe, which is the binary of the Service that will run remotely.
If using a domain admin account you are not able to perform a network type logon like this one on the remote machine it is probably because the Admin$ share has been disable via a policy/registry key.
Try by yourself running a cmd as that Domain Admin user and then from that CMD issuing a net use \ComputerName\Admin$. You should get the same error.
HTH
-mario -
mehdi smichi 6 Reputation points
2022-06-02T15:57:44.087+00:00 psexec -i worked many thanks @Alex Mihaiuc