Creating Scheduled Task using GPO
-
Hello everyone again. Veterinarian learning IT NOOB. I need to create a scheduled task via GPO and I have found several tutorials, but for several reasons, I cannot get them to work. They mostly seem to unfold like this
https://deployhappiness.com/automatic-restarts-make-for-a-smooth-day/
In this example, it shows it being created under computer
Note the instructions say Computer Configuration/...
Then it says to change the task's account to NT Authority\System
And lastly it says to change to run the task where ever the user is logged on or not.Mine shows this last line as grayed out so I cannot change it, but after I save it and re-open it now I can change it. Weird.
So still not sure if I am doing this correctly, but when I gpupdate /force and check the target machine, I don't see this task when I am logged in as a domain user and run task scheduler as administrator. Is there somewhere else I should look?
-
@srdennis You need to set the action to Create and then set the settings as below:
Under actions this is what I have
-
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
-
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.
-
@Dashrender I think I saw that post. So there may not be a place to see the task?
-
Hey deabeto! Is that a user or a computer GPO?
-
@srdennis said in Creating Scheduled Task using GPO:
Hey deabeto! Is that a user or a computer GPO?
You'll want to make that a Computer Policy. And the System account has rights to shutdown a computer so that should work as he has shown.
-
@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.
That's probably because the System doesn't get network access, and you can't save credentials in GPOs anymore, some options are still there for it but it won't work.
-
@thecreaitvone91 Great. I created it as a computer GPO and linked it, but it isn't shutting down the computer but I also don't see it in the task scheduler. What other trouble shooting should I do? Also here is what it looks like so if you see anything missing please let me know. Thank you very much.!
-
@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.