troubleshooting Question

GPO to create a scheduled task not creating a task

Avatar of hypercube
hypercubeFlag for United States of America asked on
Group PolicyActive Directory
13 Comments1 Solution24 ViewsLast Modified:
I'm trying to set up a GPO that does a very simple thing:
run a command line:
shutdown -r
and apply this to all computers so they will reboot at the common scheduled time.

Some time ago, I "learned" that using the built-in GPO Computer Configuration structure would not work.  I believe it was:
Computer Configuration / Preferences / Control Panel Settings / Scheduled Tasks / Scheduled Task [name]
etc.
Anyway, in view of my recent problems, I tried it again and, sure enough, no task was created.
The task is a one-line .bat file stored on the DC at:
C:\Users\Public\Scripts\Scheduled Task Files\[fllename.bat
... because that seems to be where the GPO expects it to be.
Now, it does appear that this file has been stored in the target computer at:
C:\Users\Public\Scripts
So, I'd expect a scheduled task pointing at C:\Users\Public\Scripts\filename.bat.
But, no such luck.
Can it be confirmed that this approach doesn't work or that I'm doing something obviously wrong?

Alternately, I've been writing all of my Task Scheduler / Scheduled Tasks with a Startup Script.  This approach does this:
Creates a startup script using:
Computer Configuration / Policies / Windows Settings / Scripts (Startup / Shutdown)
The startup script writes the same simple .bat file to C:\Public\Scripts on the target workstations.  And, it creates a scheduled task using schtasks which executes that batch file.
This has been working - but not now it seems.
So, I'm trying to do a "reset" on how I approach this simple objective!!



ASKER CERTIFIED SOLUTION
hypercube

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 13 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 13 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004