PsExec: Logon failure: the user has not been granted the requested logon type at this computer.

Theo Yianni 31 Reputation points
2021-01-17T00:00:42.41+00:00

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.

Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Alex Mihaiuc 736 Reputation points
    2021-01-21T19:36:22.627+00:00

    The solution for 2.30+ is to add the -i flag for interactive session.

    14 people found this answer helpful.

  2. Mike Diack 61 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.

    5 people found this answer helpful.

  3. mehdi smichi 11 Reputation points
    2022-06-02T15:57:44.087+00:00

    psexec -i worked many thanks @Alex Mihaiuc

    2 people found this answer helpful.
    0 comments No comments

  4. mariora 381 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

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.