Use this when organizing scheduled tasks.
Task Scheduler Library
The Task Scheduler Library is the folder tree of all scheduled tasks, including Microsoft's built-in ones under \Microsoft\Windows. Create your own folder to keep custom tasks organized.
1. Browse taskschd.msc library folders.
2. Custom tasks in their own folder.
3. Export: Export-ScheduledTask <name>.
4. Microsoft tasks: change only if documented.
5. Permissions on task folders.
library folders → task definitions (XML) in C:\Windows\System32\Tasks
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Disabling built-in maintenance tasks without knowing their role (Defender, disk optimisation).
- Malware persistence hiding in deep folders — review new tasks (event 4698).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Use your own folder for custom tasks.
- Microsoft tasks live under \Microsoft\Windows.
- Export tasks as XML for backup.
Get-ScheduledTask -TaskName <name> | fl *— task definitionGet-ScheduledTaskInfo -TaskName <name>— last run time and resultschtasks /query /tn <name> /v /fo list— details in CMDGet-WinEvent -LogName Microsoft-Windows-TaskScheduler/Operational -MaxEvents 30— task history (enable first)
ReferenceWhy it matters1 section · depth on demand
What it is
The Task Scheduler Library is the folder tree shown in taskschd.msc. Each folder maps to a directory under C:\Windows\System32\Tasks, and each task is an XML definition. Put your own tasks in a dedicated folder (for example \Company\) so they are easy to find, export and audit separately from the built-in \Microsoft\Windows\ tasks.
ReferenceHow it works1 section · depth on demand
In depth
The Task Scheduler Library is a folder tree (\Microsoft\Windows\… for OS tasks); tasks are stored as XML in C:\Windows\System32\Tasks.
Get-ScheduledTask -TaskPath '\CorpOps\' | Get-ScheduledTaskInfo | Select TaskName,LastRunTime,LastTaskResult,NextRunTime
Export-ScheduledTask -TaskName Cleanup -TaskPath '\CorpOps\' > cleanup.xml
Register-ScheduledTask -Xml (Get-Content cleanup.xml -Raw) -TaskName Cleanup -TaskPath '\CorpOps\'
schtasks /query /fo LIST /v /tn "\CorpOps\Cleanup"
Put your own tasks in a dedicated folder; attackers often hide persistence among the many Microsoft tasks.
ReferenceImportant terms & boundaries1 section · depth on demand
Structure
Tasks are stored in C:\Windows\System32\Tasks as XML and organised in folders (\Microsoft\Windows\... for built-in tasks). Export/import with Export-ScheduledTask / Register-ScheduledTask -Xml.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Task Scheduler → Task Scheduler Library. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page · confidence 94%