Task Export Diff

Task Export Diff

Paste two exported scheduled-task XMLs, such as a golden image and a suspect host, and see which triggers, actions, principals and paths changed, with the per-machine noise folded away.

0 KiB of 256 KiB

From the machine you trust: a golden image or a healthy peer.

0 KiB of 256 KiB

From the host you are checking. B is compared against A.

Two tasks · up to 256 KiB each · stays in this tab

Paste a task into A and B, then press Compare.

Paste the same task from two machines.

A is the copy you trust, B the one you are checking. You get the triggers, actions, principals and settings that differ, with risky changes flagged and per-machine noise folded away.

  • Task Scheduler: right-click the task, Export…, open the file in Notepad, copy all.
  • PowerShell: Export-ScheduledTask -TaskName "Name" -TaskPath "\Folder\"
  • Command prompt: schtasks /query /tn "\Folder\Name" /xml

What it does

A line diff of two Task Scheduler exports is mostly noise: the author, the export date, the machine's own user SIDs, and the different layout of a GUI export and an Export-ScheduledTask export. This page reads both XML files in your browser, fills in the schema defaults so a missing setting equals an explicit default, and compares triggers, actions, principals and settings field by field. Changes that commonly matter in an investigation (a program moved into a user-writable folder, a script host with encoded arguments, a switch to SYSTEM or highest privileges, a hidden task) carry a flag. Everything per-machine is counted under Noise and kept out of the way.

Worked example: a sync task moved into a user folder

A is the task from a golden image. B is the same task taken from a workstation during triage.

ChangedExec 1
  • User-writable path Command is under \Users\
Field Baseline Suspect
CommandC:\Program Files\Fernhill\Sync\fhsync.exeC:\Users\Public\Libraries\fhsync.exe
ChangedPrincipal "Author"
  • Runs as SYSTEM UserId is S-1-5-18
  • Highest privileges RunLevel is HighestAvailable
Field Baseline Suspect
UserIdS-1-5-21-…-1107S-1-5-18
RunLevelLeastPrivilegeHighestAvailable

The author, the export date and the description also differ. They are listed under Noise, not as changes.

What counts as noise

RegistrationInfo Author, Date, URI, Description, Version, Source, SecurityDescriptorWritten by whoever registered or exported the task, and when. They differ between machines even when the task is the same.
A UserId that is a machine or domain SID (S-1-5-21-…) on both sidesEach machine numbers its own accounts, so the same user has a different SID. Well-known SIDs such as S-1-5-18 (SYSTEM) are never noise.
The version attribute, XML declaration encoding and whitespaceThey change with the exporting tool, not the task.

How to use it

  1. Export the task on both machines: Task Scheduler › Export, Export-ScheduledTask, or schtasks /query /tn "\Folder\Name" /xml.
  2. Paste the trusted copy into A and the copy you are checking into B.
  3. Press Compare, read the flagged items first, then copy the result as text or Markdown into your case notes.

What it does not do

Questions

Why do an Export-ScheduledTask file and a Task Scheduler export look different?

They use a different version attribute, encoding declaration and layout, and one may leave out settings that are at their default. The page ignores all of that and fills in defaults, so two exports of the same task show no differences outside Noise.

Why is my UserId change under Noise?

When both sides are machine or domain SIDs (starting S-1-5-21-…), the difference is usually the same account on another machine. A change to or from a well-known SID or a name, such as SYSTEM, is always listed as a change.

What does "case only" mean?

The Command or WorkingDirectory differs only by upper and lower case. Windows paths are not case-sensitive, so it is shown but not flagged.

Is the XML sent anywhere?

No. It is read and compared in this tab. After the page loads it works with the network off, and closing or reloading the tab clears everything.

See it work

A suspect copy of a sync task: the program moved into C:\Users\Public and now runs as SYSTEM, both flagged, with machine noise folded away.
A suspect copy of a sync task: the program moved into C:\Users\Public and now runs as SYSTEM, both flagged, with machine noise folded away.
The same task exported from the GUI and from PowerShell: no differences in triggers, actions, principals or settings, only per-machine noise.
The same task exported from the GUI and from PowerShell: no differences in triggers, actions, principals or settings, only per-machine noise.
A trigger moved and a second one added: each field shown old → new, with nothing else in the way.
A trigger moved and a second one added: each field shown old → new, with nothing else in the way.

More pictures, and how Task Export Diff works