As detailed in this MSDN blog post, you can chain tasks together by setting up a custom event trigger and use the XPath Filter editor to target events indicating that the previous task completed:

The TaskName
value is the path to the task in Task Scheduler, so if you want to trigger on a task called "Task01", placed in the root folder of the task scheduler library, value should be "\Task01"
Unfortunately, the New-ScheduledTaskTrigger
cmdlet doesn't support custom event log based triggers, so the only way to automate deployment of such a task is to:
- Create it "by hand"
- Export it
- Update the XML if necessary
- Import on target machine
Step 2-4 can be accomplished programmatically with Export-ScheduledTask
, the [xml]
type accelerator and schtasks /create /xml