I want to write a powershell script that creates a scheduled task in Windows, but if it fails, it will try again in an hour. Essentially, I want the equivalent of these boxes:
How would I modify the code below to be able to control those parameters?
$action = New-ScheduledTaskAction -Execute 'aggregate.pyw'
$trigger = New-ScheduledTaskTrigger -Daily -At 4:30am
Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "Auto aggregate"