I'm trying to set up a GPO that does a very simple thing:
run a command line:
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]
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:
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!!