GPO doesnt apply schedule task neither execute startup script

Diogo Jesus 0 Reputation points
2023-03-22T17:44:03.43+00:00

Hello,

Please help me, I'm getting crazy and I think I'm gonna suicide in the next days it this continue.

I need to execute a vbs script. The script works perfectly stored in local computer, then I put it on a shared folder, same shared folder for other apps that I want to deploy throught GPO and also works when I execute that in local computer.

I tried to deploy the script in 3 ways:

  1. I created policy to run script at startup, nothing happened;
  2. I created policy to use a .cmd file to execute the vbs, nothing happened again;
  3. I create a policy to do a schedule task to execute the cmd and unfortunately nothing happened again.

Looks like the policy doesn't apply, for example, the scheduled task was not even created.

I already did a gpresult and check in rsop.msc and the policy is applied.

User's image

User's image

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,802 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,391 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,208 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,306 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 43,971 Reputation points
    2023-03-23T15:50:49.0166667+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having query\issues related to schedule task or Startup script not working.

    1. Please Do not enable the Run in logged-on user's security context (user policy option) Common option when configuring user.
    2. As you have mentioned that script is not running even in from logon or startup script , please try to put some logs file to check where its stuck.

    https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/whats-new/script-logging?view=powershell-7.3

    1. Configure Logon Script Delay from GPO -> Computer Configuration\Administrative Templates\System\Group Policy\Configure Logon Script Delay
    2. Please also make sure User and Computer is placed in right OU or Security Group on which this GPO is applied.

    Reference :

    https://learn.microsoft.com/en-us/troubleshoot/windows-server/group-policy/user-gpp-scheduled-task-item-fails-apply

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments