Batch file of a scheduled task through GPO not working, it works when launched manually

RRphotography 21 Reputation points

I have setup a GPO to deploy a scheduled task which runs a batch file available at server level.
The batch has been saved in both these locations:

I first tried with this:

then this:

The task is available at the domain computer client after the gpupdate /force command. Unfortunately, it doesn't work, I mean either at the scheduled time or by running it manually through the RUN button in the scheduler task app.
But... If I launch manually the batch file through the file explorer app, it works.

I cannot understand which kind of errors there are.

Here are the task details:


NT AUTHORITY\SYSTEM has FULL CONTROL at the folder (and file) where the batch file is stored.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,001 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,465 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Limitless Technology 39,481 Reputation points

    Hello R99photography

    The default locations should be:

    %SystemRoot%\SYSVOL\sysvol\<domain DNS name>\scripts.


    %SystemRoot%\SYSVOL_DFSR\sysvol\<domain DNS name>\scripts (for DFS-Based FRS since as is recommended from Server 2012R2 and avobe)

    If still don't run I would try to enable the synchronous load in the GPO:
    "User Configuration -> Policies -> Administrative Templates -> System -> Scripts" to "Enabled

    Also the logon delay settings at: Configure Logon Script Delay setting to Disabled in the Computer Configuration ->Administrative Templates ->System ->Group Policy

    0 comments No comments

  2. MotoX80 32,531 Reputation points

    If the script is local to the machine, don't use a UNC path (\server\share), point directly to the drive. C:\MyData\Scripts\myScript.bat.

    If you are trying to run a task on a workstation, and pull the script from a server over the network, then you will need to insure that the AD account for the machine (YourDomain\WorkStation1$) has access on both the share permissions and file permissions on the server since you are running the task as SYSTEM.

    0 comments No comments

  3. Greg Childers 16 Reputation points

    no luck getting this to work, nothing shows under scheduled task