Creating Scheduled Task using GPO
-
Well this is your issue
Which comes down to my previous comment of the wrong Variable used."The filename, directory name, or volume label syntax is incorrect"
-
It's
%SystemRoot%
, not%SystemDir%
, thanks @dbeato for looking up the error. -
You ROCK!!! Thanks dbeato.
Here is my AD
And my GP with the GPO linked to the Test OU with WS27 in it.
Here is the correction
But that didn't even work so I copied just what you had c:\Windows\system32\shutdown.exe. Still no love after gpupdate /force
So then a friend of mine said that I couldn't just type in NT Authority \System. I had to use the change user and search with just system. When it came up with SYSTEM, I selected this and then when I went back to the place where the user goes, it said NT Authority\System! So now it seems to be working. I think a combo of the pathway as well as the user was why I couldn't get this to work. None of the walk throughs were written for someone with such little knowledge as myself.
Thanks for the help
-
Oh and BTW, I can only see the task if I run the task scheduler as an administrator and enter in my domain credentials for this for the administrator account.
-
On a side note...Is there a way to put in these variable (%SystemRoot%) somewhere to see where they go? Like can I put cd %SystemRoot% into CMD and then PWD to see where I am?
-
@srdennis said in Creating Scheduled Task using GPO:
On a side note...Is there a way to put in these variable (%SystemRoot%) somewhere to see where they go? Like can I put cd %SystemRoot% into CMD and then PWD to see where I am?
File explorer, just type it in and hit enter.
Or, open up cmd.exe, and type
set
and hit enter, that lists all the environment vars. -
@srdennis said in Creating Scheduled Task using GPO:
You ROCK!!! Thanks dbeato.
Here is my AD
And my GP with the GPO linked to the Test OU with WS27 in it.
Here is the correction
But that didn't even work so I copied just what you had c:\Windows\system32\shutdown.exe. Still no love after gpupdate /force
So then a friend of mine said that I couldn't just type in NT Authority \System. I had to use the change user and search with just system. When it came up with SYSTEM, I selected this and then when I went back to the place where the user goes, it said NT Authority\System! So now it seems to be working. I think a combo of the pathway as well as the user was why I couldn't get this to work. None of the walk throughs were written for someone with such little knowledge as myself.
Thanks for the help
Well yeah, you couldn't just type it. I wondered for a second if that was the case but didn't ask...
-
Yep. I am that much of a NOOB!
-
@srdennis said in Creating Scheduled Task using GPO:
Oh and BTW, I can only see the task if I run the task scheduler as an administrator and enter in my domain credentials for this for the administrator account.
This is expected.
-
@Dashrender
This worked for me perfectly, being playing around with the settings for this a while without any luck, was missing NT Authority\System. Thanks a mil