1. Resources
  2. Detection sources
  3. Event ID 4699

Event ID 4699: A scheduled task was deleted

Written when a scheduled task is deleted, with the deleting account, the task path and the full XML of the task that was removed. Read next to 4698, it shows tasks that were created, used and then cleaned up.

Log source
Windows Security log
Detection value
Context
Volume
Low
Last updated
Audit subcategory
Audit Other Object Access Events (Object Access, Success)
Logged on
All Windows computers
Event versions
0, 1
Detects
Not read by our detection rules yet

When it is written

Windows writes 4699 on the computer where a scheduled task is deleted, every time one is deleted, if Audit Other Object Access Events is on for Success. Task Content holds the XML of the deleted task in the Task Scheduler schema, so the event keeps what the task ran (Actions), when (Triggers) and as whom (Principals) after the task itself is gone.

Creating a task writes 4698, changing it 4702, and enabling or disabling it 4700 or 4701, all in the same subcategory. A task that is created and deleted shortly afterwards leaves a 4698 and a 4699 with the same Task Name on the same computer; on its own, the 4698 shows an ordinary new task.

How to turn it on

Advanced audit policy subcategory Audit Other Object Access Events, Success. Set it in a Group Policy object linked to the computers that write the event:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Object Access > Audit Other Object Access Events
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersSuccess and FailureRecommended in both baselines. Success mainly for the scheduled task events, Failure for the events about a possible ICMP denial of service attack.
Member serversSuccess and FailureRecommended in both baselines. Success mainly for the scheduled task events, Failure for the events about a possible ICMP denial of service attack.
WorkstationsSuccess and FailureRecommended in both baselines. Success mainly for the scheduled task events, Failure for the events about a possible ICMP denial of service attack.
Check the current setting
auditpol /get /subcategory:"Other Object Access Events"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Other Object Access Events" /success:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9227-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.

Run the commands in an elevated prompt on a computer that writes the event. Subcategory settings take effect only when the security option Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is enabled (the default), and a Group Policy object that sets advanced audit policy replaces local changes at its next refresh. Microsoft's advanced audit policy reference

Fields

In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.

FieldWhat it holdsSince
Security IDSubjectUserSidSubjectSID of the account that deleted the task. Event Viewer shows it resolved to an account name when it can. S-1-5-18 when a process running as Local System deleted it.v0
Account NameSubjectUserNameSubjectName of that account. For Local System it is the computer account, a name that ends with $.v0
Account DomainSubjectDomainNameSubjectDomain of the deleting account, usually as a NetBIOS name, the computer name for a local account, or NT AUTHORITY for well-known principals.v0
Logon IDSubjectLogonIdSubjectHexadecimal ID of the deleting account's logon session. It matches the Logon ID of the 4624 event on the same computer, whose logon type and source address show how and from where the task was deleted.v0
Task NameTaskNameTask InformationFull path of the deleted task in the Task Scheduler Library, as \folder\name. A name with no folder was in the root.v0
Task ContentTaskContentTask InformationXML definition of the deleted task in the Task Scheduler schema, with registration information (author, date), triggers, principals (UserId, LogonType, RunLevel), settings and actions (Exec with Command and Arguments, or a COM handler).v0
ProcessCreationTimeClientProcessStartKeyOther InformationStart key of the client process that deleted the task, shown by Event Viewer as ProcessCreationTime although it is not a time. A start key identifies one run of a process and is not reused (Microsoft describes start keys as unique across boot sessions). Not documented for this event. Version 1.v1
ClientProcessIdOther InformationID of that client process, in decimal. Not documented for this event. Version 1.v1
ParentProcessIdOther InformationID of the parent of that client process, in decimal. Not documented for this event. Version 1.v1
FQDNRpcCallClientLocalityOther InformationA number whose name matches the RPC runtime's client locality list (0 invalid, 1 local, 2 remote, 3 unknown). Microsoft does not document it for this event; its sample shows 0. Event Viewer's message shows this value on the line labelled FQDN. Version 1.v1
FQDNA computer name. Microsoft's sample shows a short host name and does not say whether it is the client's or the local computer's. Not shown in Event Viewer's message. Version 1.v1

Event versions

The template has two versions. Version 0 has six fields. Microsoft's event page notes that Windows 10 version 1903 and later add five fields (version 1): ClientProcessStartKey, ClientProcessId, ParentProcessId, RpcCallClientLocality and FQDN. Microsoft does not describe them. In the message Event Viewer shows (taken from the Windows template), the start key is labelled ProcessCreationTime, the line labelled FQDN displays RpcCallClientLocality, and the FQDN field itself appears only in the event XML.

  • Version 0: 6 fields
  • Version 1: 11 fields, adds ClientProcessStartKey, ClientProcessId, ParentProcessId, RpcCallClientLocality, FQDN

Values to know

Account Name SubjectUserName

ValueMeaningSignal
Ends with $The computer account, for a task deleted by a process running as Local SystemWindows and installed software removing their own tasks.Expected
Any other accountA named account deleted the taskLook for the 4698 that created the same task and for the logon (4624) of the deleting session.Worth knowing

Task Name TaskName

ValueMeaningSignal
\Name (no folder)A task in the root of the Task Scheduler LibraryMicrosoft notes that tasks created by hand or by malware are often in the root, and that deleting such a task can be a sign of malicious activity.Attack signal
\Microsoft\Windows\...The folder of Windows' own tasksExpected

Task Content TaskContent

ValueMeaningSignal
<Exec><Command>...</Command>The program the deleted task ranCompare it with the processes started on the computer (4688) while the task existed.Worth knowing
<LogonType>Password</LogonType>The task stored the password of its run-as accountMicrosoft's sample event shows such a task being deleted.Worth knowing

Volume and noise

Low. Microsoft rates Audit Other Object Access Events Low and notes that task deletion does not happen often. Most 4699 events come from software that removes its own tasks when it is updated or uninstalled, usually under Local System, so the subject is the computer account (a name ending with $). Microsoft gives the event a potential criticality of Low in its list of Active Directory events to monitor.

Keeping it manageable

  • Keep every 4699 wherever you collect 4698: they share the subcategory, so 4699 costs nothing more to turn on, and the volume is low.
  • Join each 4699 to the 4698 with the same TaskName on the same computer. A task created and deleted by a named account within a short time deserves a look, especially on a domain controller.
  • Microsoft recommends watching deletions of tasks in the root of the Task Scheduler Library (TaskName with no folder), and deletions of critical tasks that should never be removed, by their TaskName.
  • Make sure the collector keeps TaskContent whole: after the deletion it is the only record of what the task ran.

Sample event

Version 1, with made-up values.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
    <EventID>4699</EventID>
    <Version>1</Version>
    <Level>0</Level>
    <Task>12804</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
    <EventRecordID>1048576</EventRecordID>
    <Correlation />
    <Execution ProcessID="712" ThreadID="2408" />
    <Channel>Security</Channel>
    <Computer>DC01.corp.example.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1104</Data>
    <Data Name="SubjectUserName">alice</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x5d3a41</Data>
    <Data Name="TaskName">\Example\NightlyReport</Data>
    <Data Name="TaskContent">&lt;?xml version="1.0" encoding="UTF-16"?&gt; &lt;Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"&gt; &lt;RegistrationInfo&gt; &lt;Date&gt;2026-11-18T09:30:11.8231044&lt;/Date&gt; &lt;Author&gt;CORP\alice&lt;/Author&gt; &lt;URI&gt;\Example\NightlyReport&lt;/URI&gt; &lt;/RegistrationInfo&gt; &lt;Triggers&gt; &lt;CalendarTrigger&gt; &lt;StartBoundary&gt;2026-11-19T02:00:00&lt;/StartBoundary&gt; &lt;ScheduleByDay&gt; &lt;DaysInterval&gt;1&lt;/DaysInterval&gt; &lt;/ScheduleByDay&gt; &lt;/CalendarTrigger&gt; &lt;/Triggers&gt; &lt;Principals&gt; &lt;Principal id="Author"&gt; &lt;UserId&gt;S-1-5-18&lt;/UserId&gt; &lt;RunLevel&gt;HighestAvailable&lt;/RunLevel&gt; &lt;/Principal&gt; &lt;/Principals&gt; &lt;Settings&gt; &lt;MultipleInstancesPolicy&gt;IgnoreNew&lt;/MultipleInstancesPolicy&gt; &lt;Enabled&gt;true&lt;/Enabled&gt; &lt;Hidden&gt;false&lt;/Hidden&gt; &lt;ExecutionTimeLimit&gt;PT1H&lt;/ExecutionTimeLimit&gt; &lt;/Settings&gt; &lt;Actions Context="Author"&gt; &lt;Exec&gt; &lt;Command&gt;C:\Program Files\Example\report.exe&lt;/Command&gt; &lt;Arguments&gt;/daily&lt;/Arguments&gt; &lt;/Exec&gt; &lt;/Actions&gt; &lt;/Task&gt;</Data>
    <Data Name="ClientProcessStartKey">2814749767106575</Data>
    <Data Name="ClientProcessId">6208</Data>
    <Data Name="ParentProcessId">4380</Data>
    <Data Name="RpcCallClientLocality">0</Data>
    <Data Name="FQDN">DC01</Data>
  </EventData>
</Event>

Attacks this event reveals

No detection rule or detection logic in our library reads this event yet. It is documented here because it sits next to the events they read: it explains them, follows from them or is the trace a defender looks for around them (see Related events).

Frequently asked questions

Can I see what a deleted scheduled task ran?

Yes. Task Content in event 4699 holds the XML of the deleted task. The program is in Actions, Exec, Command, with its arguments in Arguments, and the account it ran as is UserId under Principals.

Why look at 4699 when the rules read 4698?

A task that is created, run once and deleted leaves a 4698 that looks like any new task. The matching 4699, with the same Task Name on the same computer shortly afterwards, shows that the task was short-lived, and its Task Content keeps the definition after the task is gone.

Does deleting a task need any other audit setting?

No. 4699 belongs to Audit Other Object Access Events, like 4698, 4700, 4701 and 4702. Turning the subcategory on for Success records all of them.

References