How to set ‘Log on as batch job access’

If you are trying to run a PowerShell Script through Windows Task scheduler in a Windows server using a service account like me, at the end of task scheduler a warning message was shown that the service account need ‘Log on as batch job access’ to run the job.

Here is a blog which explains how to schedule PowerShell script to run from task scheduler

If you try to run the job without providing log on as a batch access to the account running the job, you will get an error with OpCode: Launch Failure – Task Scheduler failed to start the task xyz.

Here are the steps to set up Log on as a batch job access for an account or group through Local Security Policy. This access can also be granted through Domain Security Policy.
1. Go to Control Panel, select Administrative Tools Control Panel -> Administrative tools
2. Open ‘Local Security Policy

local security policy
3. Expand ‘Local Policies‘ under Security settings
4. Select ‘User Rights Assignment‘.

Log on as batch job
5. In the right pane, right click on ‘Log on as a batch job‘ and select Properties
6. Add user, click ‘Ok‘. Close Local Security Policy tab.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Find all Private channels in a Team

Private channel in a team is an access controlled space available only for Owners and Members of the channel. Guests can be added to private channel as long as they are already member of the team. This should do for a quick intro about private channels. Well, the point of this post is it not […]

Read More

Disable feedback surveys in Power Platform

If you have worked in Microsoft 365 PowerApps or Power Automate, you might be familiar with feedback survey which pops up quite often. Microsoft wants your feedback on how likely are your to recommend Power Automate to a friend or colleague? Well, I ran into a conversation in twitter about this survey. Apparently I learnt […]

Read More

Missing a column in SharePoint list/library filter pane

Missing a column in SharePoint list/library filter pane? It is normal. Not all columns are available in the filter pane by default. What is filter pane? Filter pane is available in the top right hand corner in list or library page. It is available by clicking on the funnel icon. Filters available are based on […]

Read More