Event ID 4699: scheduled task deleted
What Event ID 4699 (scheduled task deleted) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.
Event ID 4699 records a scheduled task being deleted. Attackers often create a task to run something once, then delete it, so a deletion soon after a creation (4698) is worth reconstructing.
The fields that matter
| Field | What it tells you |
|---|---|
| Subject > Account Name | Who deleted the task. |
| Task Name | The task path, for example \Microsoft\Windows\UpdateCheck. |
| Task Content | The task XML at the time of deletion, including the command it ran. |
What is normal
Software uninstallers removing their own tasks, and admins cleaning up.
When Event ID 4699 is suspicious
- A task created and deleted within minutes, especially one running PowerShell,
cmd.exeor a file in a user folder. - Deletion of security tool tasks, such as antivirus updates or log forwarders.
Common false positive: Updaters that create and remove tasks on every update.
Find Event ID 4699 with PowerShell
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4699; StartTime=(Get-Date).AddDays(-7)} -MaxEvents 50 |
ForEach-Object {
$d = [ordered]@{ Time = $_.TimeCreated; Computer = $_.MachineName }
([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
[pscustomobject]$d
} | Format-List
Microsoft Sentinel (KQL)
SecurityEvent
| where TimeGenerated > ago(7d) and EventID == 4699
| project TimeGenerated, Computer, Account, Activity, EventData
| order by TimeGenerated desc
Related events
- Event ID 4698: Scheduled task created
- Event ID 4702: Scheduled task updated
- Event ID 4688: New process created
FAQ
Can I see what a deleted task did?
Yes. The Task Content field in 4699 (and in the original 4698) includes the full XML, with the command line and trigger.
Windows Event Triage reads a CSV, EVTX-to-JSON or XML export in your browser and flags brute force, new admins, suspicious services and log clearing.
IOC Triage, our free browser extension: right-click it for a verdict from 15 threat-intel sources, then copy a ready ticket note.