Note: This article was published on 02/27/2025. --- This is a working note.
Although this topic is ndependent, but it was derived from the Remove IIS Log Files project. So we merge this article into the series of articles for REmove IIS Log Files.
This series of articles are to discuss a task to remove IIS Log Files. We start from doing the task manually, then make automation, and the last deploy the automation to pipelines (different servers):
Issue:
We got this error about "Log on as a batch job"
![]()
We need to Add "Log on as a batch job" right to a user.
Ask AI --- Copilot from Microsoft
Search AI for: Add "Log on as a batch job" right to a user
![]()
Search AI: open local security policy windows
![]()
Solution:
Following the second AI search, we have two ways to open a Local Security Policy window, Open Run window:
![]()
Type in: secpol.msc:
![]()
OK:
![]()
Or, from Start => type in Local Security Policy
![]()
Local Security Policy Windows => Local Policies => User Rights Assignment => Click Log on as a batch job
![]()
Open the Properties window => Add User or Group:
![]()
Type in the Object name:
![]()
If the group name is not you want, Click Locations button to open locatioins Window:
![]()
Switch the group name:
![]()
OK
![]()
OK