https://github.com/jftuga/logon_as_batch_job
Gives the 'logon as a batch job' privilege to a domain user
https://github.com/jftuga/logon_as_batch_job
Last synced: about 1 year ago
JSON representation
Gives the 'logon as a batch job' privilege to a domain user
- Host: GitHub
- URL: https://github.com/jftuga/logon_as_batch_job
- Owner: jftuga
- License: mit
- Created: 2021-02-08T21:34:58.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-09T21:52:01.000Z (over 5 years ago)
- Last Synced: 2025-01-29T23:29:58.697Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logon_as_batch_job
Gives the 'logon as a batch job' privilege to a domain user
## Synopsis
The `logon as a batch job` privilege is required when creating a task from within `Task Scheduler`. Setting this is normally accomplished with the `Local Security Policy` *(secpol.msc)* control. However, this program is not included in `Windows Server Core`, thus making it difficult to configure. This program solves this problem as it is a command-line tool. In order for successful operation, it must be used in the `Run As Administrator` context.
___
## Usage
```
logon_as_batch_job.exe DomainName\UserName
```
## Example
```shell
C:>logon_as_batch_job.exe myDomain\myUserName
LookupAccountName result = True
IsValidSid: True
LookupAccountName domainName: MYDOMAIN
LsaAddAccountRights return value: 66307801059688448
```
## License
* [MIT License](LICENSE)
## Acknowledgments
* [Set Logon as batch job rights to User by Powershell, C# and CMD](https://morgantechspace.com/2014/03/set-logon-as-batch-job-rights-to-user-by-powershell-csharp-cmd.html)
* [How do I force my .NET application to run as administrator?](https://stackoverflow.com/questions/2818179/how-do-i-force-my-net-application-to-run-as-administrator)