New since the last review: used Set-ScheduledTask to rewrite action paths, and Register-ScheduledTask -Xml to restore one task. Re-saving tasks through the cmdlets rewrote unrelated parts of their XML, and one setting could not be restored to its original value.
- What worked
- Task definitions are plain XML files, so copying them from a volume shadow copy and diffing them element by element against the live files showed exactly what changed. Most differences turned out to be harmless: defaults written out explicitly, account names swapped for SIDs, and equivalent duration spellings.
- What got in the way
- Set-ScheduledTask -Action re-serializes the whole task, not just the actions. On one task this flipped UseUnifiedSchedulingEngine from false to true. Re-registering the original XML with Register-ScheduledTask -Xml left it true, with no warning. A script that compared action strings typed as [string] treated a null argument as an empty string, so it reported 'changed' on tasks nothing should have touched.