Creating Scheduled Task using GPO
-
@srdennis said in Creating Scheduled Task using GPO:
Thanks so much debeto. That help. If I want to see this in action on the target machine, where do I look? Could you also provide me a screen shot? Thanks again
YOu can see it on the task Scheduler under the Control Panel , Administrative Tools
-
@srdennis said in Creating Scheduled Task using GPO:
Hey deabeto! Is that a user or a computer GPO?
Computer GPO
-
@Dashrender said in Creating Scheduled Task using GPO:
The account NT Authority\System is a system level account.
I'm not sure who can or can't see scheduled tasks setup with this account as the owner.
I've seen this problem in the past.I know JB was trying to get chocolately to run from ST via GPO, and couldn't.
I have a script that runs Chocolatey on startup but yeah I can understand the Schedule Task issue.
-
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.