Back to Blog

Event ID 200 TaskScheduler Shows Which Scheduled Task Launched a Program

Christopher 4 min read
referencewindows

Event ID 200 from the Microsoft-Windows-TaskScheduler source records each action a scheduled task launched. Microsoft lists its message as follows, where %1 is the task, %2 is the action, and %3 is the instance.

Task Scheduler launched the "%2" action in the "%3" instance of task "%1".

Microsoft's guidance for the event on its own is "This is a normal condition. No further action is required." The events appear on the "History" tab of each task in Task Scheduler. They can also be read with Get-WinEvent.

What it means

One event 200 is written for each action a task runs. When a program you removed keeps coming back, or your antivirus blocks the same file again every day, look for an event 200 at the minute it started. The task named in that event is the one still launching the program.

How to find the cause

  1. Open Task Scheduler and check the "Action" pane. Task history can be enabled or disabled there. Select "Enable All Tasks History" if that is the option shown.
  2. Note the time of the next start or block, from your antivirus's detection history or the program's own log.
  3. List the task events from the hour before the block. Run it within an hour of the block, or change AddHours(-1) to reach back further.
Get-WinEvent -FilterHashtable @{ ProviderName='Microsoft-Windows-TaskScheduler'; Id=129,200,201; StartTime=(Get-Date).AddHours(-1) } | Select-Object TimeCreated,Id,Message
  1. Find the event 200 at the minute of the block. Event 129 from the same task instance records the process ID it launched, which you can match to the running process.
  2. Export the task's definition as XML and keep the output before you change anything. Pass the task's folder as -TaskPath with a leading and trailing backslash. '\' is the root folder.
Export-ScheduledTask -TaskName 'Name from the event' -TaskPath '\'
  1. Find out who created the task. Security event 4698, "A scheduled task was created", records the account that created it and the task's XML in its "Task Content" field. It belongs to the "Audit Other Object Access Events" audit subcategory.
Get-WinEvent -FilterHashtable @{ LogName='Security'; Id=4698 } -MaxEvents 20 | Select-Object TimeCreated,Message

Fixes

Disable the task first, so it can't launch the program again while you check it.

Disable-ScheduledTask -TaskName 'Name from the event' -TaskPath '\'

Remove the task once you know nothing you need depends on it. Unregister-ScheduledTask asks for confirmation before it removes the task.

Unregister-ScheduledTask -TaskName 'Name from the event' -TaskPath '\'

Check the root folder of the Task Scheduler Library for other tasks you don't recognize. Microsoft notes that scheduled tasks created manually or by malware are often located in the root node.

Get-ScheduledTask -TaskPath '\' | Select-Object TaskName,State

Turn on auditing for the "Audit Other Object Access Events" subcategory on the PCs where this matters, so event 4698 records the next task that is created.

Related events

Where ET Ducky shows it

I build ET Ducky. Its agent reads process creation events from the kernel, so a program a scheduled task starts shows up in the event stream with its parent. Beyond the fifteen built-in behavioral rules, you can create custom rules using a rule builder to monitor for events that are unique in your environment. Automations can be configured around the alerts those rules raise.

Sources

Behavioral detections in ET Ducky

Read how the built-in behavioral rules and custom detection rules work in ET Ducky.

Read the behavioral detections docs