The Scheduled Task Looked Legitimate — Until We Checked What It Launched
The scheduled task had an ordinary name.
It ran at a predictable time.
It did not contain the word malware.
Nothing about the task name alone demanded an incident.
Then Agent Foskett stopped looking at the name and followed the execution chain.
The task launched a trusted Windows utility. That utility launched PowerShell. PowerShell reached into a user-writable directory.
The scheduled task was not the conclusion.
It was the beginning of the timeline.

Don't Trust The Task Name
Scheduled tasks are normal Windows functionality. The investigation changes when the task's execution chain, creator, target or timing no longer fits the environment.
The task name looked harmless
The task name looked like something an administrator or application could plausibly create. That made it tempting to dismiss.
But names are labels. They are not evidence.
Agent Foskett asked three questions instead:
Who created it? What did it launch? What happened next?
Find scheduled-task creation activity
schtasks.exe activity and inspecting the command line rather than assuming every use of the utility was malicious.- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
DeviceProcessEvents
| where Timestamp > ago(14d)
| where FileName =~ "schtasks.exe"
| project Timestamp,
DeviceName,
AccountName,
ProcessCommandLine,
InitiatingProcessFileName,
InitiatingProcessCommandLine,
InitiatingProcessAccountName
| order by Timestamp descThe command line changed the investigation
Agent Foskett extracted the device, account, task timing and executable path, then pivoted into the endpoint process timeline around the scheduled execution.
Follow what the task launched
DeviceProcessEvents allowed Agent Foskett to reconstruct the process relationship. The important evidence was not simply that PowerShell existed on the device. It was the relationship between the scheduled execution, the parent process and the command that followed.- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
let Device = "WS-024";
let StartTime = datetime(2026-09-28 02:00:00);
DeviceProcessEvents
| where DeviceName =~ Device
| where Timestamp between (StartTime - 5m .. StartTime + 15m)
| project Timestamp,
AccountName,
FileName,
ProcessCommandLine,
InitiatingProcessFileName,
InitiatingProcessCommandLine,
SHA256
| order by Timestamp ascPowerShell was not suspicious by itself
powershell.exe in telemetry is not enough to call an incident malicious.What changed the context was how it was launched and what its command line referenced: a script stored under a user-writable path that did not match the expected application or administrative workflow.
Agent Foskett therefore pivoted from the process into the file evidence.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
let Device = "WS-024";
DeviceFileEvents
| where Timestamp > ago(14d)
| where DeviceName =~ Device
| where FolderPath has @"\AppData\"
| where FileName endswith ".ps1"
| project Timestamp,
DeviceName,
ActionType,
FileName,
FolderPath,
SHA256,
InitiatingProcessFileName,
InitiatingProcessCommandLine
| order by Timestamp ascWhen did the persistence appear?
Agent Foskett widened the window around the task creation and looked for registry activity that could provide additional persistence or configuration context.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
let Device = "WS-024";
DeviceRegistryEvents
| where Timestamp > ago(14d)
| where DeviceName =~ Device
| project Timestamp,
ActionType,
RegistryKey,
RegistryValueName,
RegistryValueData,
InitiatingProcessFileName,
InitiatingProcessCommandLine
| order by Timestamp ascThe timeline told the story
Placed in chronological order, they became much harder to dismiss.
A script appeared in a user-writable directory. A process created a scheduled task. At the configured time, the task launched a trusted component. That execution led to PowerShell and the script.
The behaviour was in the relationships between the events.
What Agent Foskett checked
What the evidence can and cannot prove
Likewise,
schtasks.exe, PowerShell and user-profile paths are not automatically malicious.The investigation becomes meaningful when multiple facts align: an unexpected creator, suspicious command line, unusual target, user-writable script, abnormal timing or follow-on behaviour.
Context turns ordinary telemetry into evidence.
The lesson
Agent Foskett ignored the label and followed what it actually did.
That changed the investigation from a harmless-looking scheduled task into a persistence chain that required explanation.
A scheduled task is not suspicious because it exists. What matters is what created it, what it launches and what happens next.
Related investigations
Final thought
That is why an analyst cannot judge a scheduled task by its name alone.
Reconstruct the creation. Inspect the action. Follow the process tree. Correlate the file and registry evidence.
Follow the evidence. Build the timeline.
The Logs Already Knew! 🔎

