1

I have been searching for a while but not getting much out of my trusty friend Google at the moment, so wondering if someone else out there might be able to share some wisdom.

By default, Windows has a Scheduled Task under Task Scheduler Library > Microsoft > Windows > SystemRestore called SR. This is set to run daily on System Startup and at Midnight however I would like it to run a little more frequently.
Obviously I can modify this manually on the odd machine, however I want to change the settings across multiple machines through GPO.

I know how to create a scheduled task in GPO but how to I edit the already created task under the above location?

Any Ideas?

Thanks James :)

4 Answers 4

0

Thanks @Matze

"I have been searching myself high and low for a solution to this question. Even creating a scheduled task item within group-policy preferences that has the exact same name doesnt work."

Like you, I tried creating a scheduled task that was called the same name as the existing one and modifying it that way but that didn't work either.

In the end I had to go for creating a new one with the times that I wanted that just sits in the root of the Task Scheduler Library.

"The only way I can think of is attaching a PowerShell startup script to your GPO, that for instance utilizes the Set-ScheduledTask Cmdlet."

I would be interested to know how you would create the script in PowerShell? I have no exposure to PowerShell and sadly my coding skills are minimal :/.

Thanks for your response on this though :)

J

0

I would be interested to know how you would create the script in PowerShell? I would recommend you use the native schtasks.exe command for this as the Set-ScheduledTask Cmdlet is overly complicated. You can use schtasks.exe from within a Powershell script, however.

Thanks

0

Create a scheduled task via GPO with the path in the name, and set it to Update, not Replace. Ensure that there is no backslash before Microsoft. So:

Name: Microsoft\Windows\SystemRestore\SR

Then just duplicate all of the same triggers/steps/etc as the original but modify what you want.

Source

Depending on what you're trying to implement, the following may also be relevant: please note that one thing I've also seen is that standard users don't have access to create Task Scheduler subfolders on Win10 or higher. Previously on Win7 they could without being local administrators. This directly affects items such as the scheduled task for remoteapp desktop shortcut creation (which isn't made since the user doesn't have the correct folder access to create it). An example of remediating this is setting the following to a powershell logon script for the standard user:

$user = $env:USERNAME + "@yourdomain.com"
$sc = New-Object -ComObject schedule.service
$sc.Connect()
$root = $sc.GetFolder("\Microsoft\Windows\RemoteApp and Desktop Connections Update")
try{$null = $root.GetFolder($user)}
catch{$null = $root.CreateFolder($user)}
-1

I have been searching myself high and low for a solution to this question. Even creating a scheduled task item within group-policy preferences that has the exact same name doesnt work.

The only way I can think of is attaching a PowerShell startup script to your GPO, that for instance utilizes the Set-ScheduledTask Cmdlet.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .