Creating Scheduled Task using GPO
-
Thanks dbeato. I think you are lucky that it is working for you as it isn't working for me. I am not sure why and I think I have set it up just like you have.
-
Have you checked event viewer on the client computer after running gpupdate for an error? make sure, Run in logged on users security context on the GPP (under common) isn't checked.
-
@srdennis said in Creating Scheduled Task using GPO:
Thanks dbeato. I think you are lucky that it is working for you as it isn't working for me. I am not sure why and I think I have set it up just like you have.
Verify the GPO is applying as said here:
@PhlipElder said in Need help trouble shooting GPO.:
GPResult /H C:\Temp\GPResults.html
That's how to find out the what/where/when for GPOs applying. Computer GPOs will only show up if the command is run via an elevated shell (CMD). The Temp directory needs to exist.
-
@srdennis said in Creating Scheduled Task using GPO:
Thanks dbeato. I think you are lucky that it is working for you as it isn't working for me. I am not sure why and I think I have set it up just like you have.
What is not working for you and can you show us your setting? There is no way to know what is failing if we don't see anything.
-
Thank you thecreaitvone91 and Obsolesce. Here is the output from the gpresult.
https://drive.google.com/file/d/1f9AD_EvjBkXM4aVtyHYObS5qKKnni8qx/view?usp=sharingDo you have any walk through on checking the event viewer?
-
@dbeato I posted pictures above. What other settings can I show you? The task isn't showing up on the target computer so this is where I am having problems. Thank you again.
-
@srdennis said in Creating Scheduled Task using GPO:
@dbeato I posted pictures above. What other settings can I show you? The task isn't showing up on the target computer so this is where I am having problems. Thank you again.
Why did you use %SystemDir%? it will not find that. It should be %WinDir%.
-
@srdennis said in Creating Scheduled Task using GPO:
@dbeato I posted pictures above. What other settings can I show you? The task isn't showing up on the target computer so this is where I am having problems. Thank you again.
Also show us where you linked the GPO and what OU and the members of the OU in AD.
-
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