Skip to content
SIEMBench
100% Client-Side Tool • Inputs Never Sent to Our Servers

Event ID 4699

Event ID 4699: Scheduled Task Deleted

A scheduled task was deleted

Log source
Security
How to enable it
Object Access > Audit Other Object Access Events (Success)
Category
Persistence
Priority
Medium
Typical volume
Medium
MITRE ATT&CK

What Event ID 4699 means

4699 records the removal of a scheduled task. On its own it is mundane, because installers and updates tidy up after themselves. In relation to 4698 it becomes a sharp indicator of task-based execution.

Legitimate tasks live for months. A task that is created, run and deleted within a minute exists only to execute something, normally as SYSTEM and often on a remote machine. Few administrators work that way, while several widely used attack tools do it by design.

The other use is defensive. Protection products, backup jobs and log forwarders register tasks, and deleting them is a quiet way to weaken a host. A short list of tasks that must exist turns the event into a tamper alarm.

Key fields to inspect

FieldMeaningSuspicious when
TaskName Path of the deleted task. The same name as a 4698 a moment earlier, or a task of a security or backup product.
SubjectUserName Who deleted it. The account that created it, or an intruder's account.
SubjectLogonId Session that deleted it. The same network session that created it.
TaskContent Definition of the deleted task, where present. Useful when the creation was not collected.
ClientProcessId Process that asked for the deletion. Match it to 4688 for schtasks.exe /delete /f.

Detection queries

Find tasks that were created and deleted within five minutes on the same computer. Adjust names and thresholds to your environment. About these queries.

Splunk SPL

index=windows source="XmlWinEventLog:Security" (EventCode=4698 OR EventCode=4699)
| stats earliest(eval(if(EventCode=4698,_time,null()))) AS created latest(eval(if(EventCode=4699,_time,null()))) AS deleted values(SubjectUserName) AS users values(SubjectLogonId) AS sessions BY Computer TaskName
| eval seconds=deleted-created
| where seconds>=0 AND seconds<=300

Microsoft Sentinel KQL

let tasks = SecurityEvent
| where EventID in (4698, 4699)
| extend TaskName = extract(@'Name="TaskName">([^<]+)', 1, EventData);
tasks
| where EventID == 4698
| project Computer, TaskName, SubjectUserName, SubjectLogonId, Created = TimeGenerated
| join kind=inner (tasks | where EventID == 4699 | project Computer, TaskName, Deleted = TimeGenerated) on Computer, TaskName
| where Deleted between (Created .. 5m)
| project Created, Deleted, Computer, TaskName, SubjectUserName, SubjectLogonId

PowerShell

Get-WinEvent -FilterHashtable @{ LogName = 'Security'; Id = 4699; StartTime = (Get-Date).AddDays(-7) } |
  ForEach-Object { $d = @{ Time = $_.TimeCreated }; ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }; [pscustomobject]$d } |
  Where-Object { $_.TaskName -notlike '\Microsoft\*' } |
  Select-Object Time, SubjectUserName, TaskName, SubjectLogonId | Format-Table -AutoSize

Attack scenarios

Impacket atexec

The tool registers a task with a random eight-letter name, runs one command with output redirected to a file in Windows\Temp, reads the file over ADMIN$ and deletes the task. Everything takes a few seconds.

Removal of protective tasks

Before encryption, operators delete tasks that create shadow copies, start backups or repair agents. Several deletions by one user on one host is the sign.

Investigation checklist

  1. Find the 4698 with the same TaskName and read what it ran.
  2. Check 4688 between the two events for a child of svchost.exe or taskhostw.exe.
  3. Look at 5145 for reads of a temporary output file on ADMIN$.
  4. If a protective task was removed, restore it and check the product's health.

Common benign causes

Event ID 4699 FAQ

Why do attackers delete scheduled tasks?

A one-off task is a way to run a command as SYSTEM, locally or remotely. Deleting it removes the visible trace, although the 4698 and 4699 events remain if they were forwarded.

Does 4699 contain the task's command?

The TaskContent field can hold the definition, but it is not always filled. The 4698 for the same task is the dependable source.

How can I tell a malicious deletion from an update?

Compare lifetime, name and session. Updates use known names, run in SYSTEM sessions and follow a schedule. Random names, network sessions and lifetimes of seconds point to an attack.

Techniques follow MITRE ATT&CK® v20.1. © 2026 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation (license). Field names were checked against Microsoft documentation and provider schemas.