Sometimes you want to run a batch file from a Task Scheduler task. For that, the user under which the task runs needs to Logon as a batch job right. If it hasn’t, you get this nice error message:
“This task requires that the user account specified has log on as batch job rights”.
Despite being part of the Windows Server 2003 Resource Kit Tools, you can still use ntrights in more modern Windows versions to grant or revoke this right.
As ntrights uses a hard to remember SeBatchLogonRight name for it and I tend to forget the ntrights syntax, I wrote two batch files to grant or revoke the Logon as Batch Job rights for the specified user:






