Scheduled task inventory and failure report
A read-only scheduled task inventory that highlights failed runs, missed runs, disabled tasks, and ownership gaps.
Good For
job failure triage
maintenance task review
server migration prep
owner cleanup
automation reliability
How to Use It
Collect all scheduled tasks from the target host or host list and preserve path, state, and author.
Capture run metadata for important tasks, including last run time, last result, next run time, and missed runs.
Review Task Scheduler operational events around failures before changing credentials, triggers, or actions.
Flag disabled tasks, unknown owners, repeated nonzero results, and tasks with stale run history.
Map business-critical tasks to owners and recovery expectations.
Export the inventory for follow-up instead of enabling, disabling, or editing tasks during discovery.
Execution Modes
- local
- remote-single-host
- remote-host-list
Inputs and Outputs
Inputs
- computer name
- CSV or TXT server list
- critical task name list
- owner mapping
Outputs
- verbose-console
- csv
- log-file
Command Starter
Writes local output artifacts: review the output path before running
# ---------------------------------------------------------------------
# Scheduled task inventory starter
# ---------------------------------------------------------------------
$OutputPath = '.\scheduled-task-inventory.csv'
$Results = foreach ($Task in Get-ScheduledTask) {
# Runtime metadata is queried per task so the inventory and execution state stay aligned.
$Info = Get-ScheduledTaskInfo -TaskName $Task.TaskName -TaskPath $Task.TaskPath -ErrorAction SilentlyContinue
[pscustomobject]@{
TaskName = $Task.TaskName
TaskPath = $Task.TaskPath
State = $Task.State
Author = $Task.Author
LastRunTime = $Info.LastRunTime
LastTaskResult = $Info.LastTaskResult
NextRunTime = $Info.NextRunTime
NumberOfMissedRuns = $Info.NumberOfMissedRuns
}
}
$Results | Export-Csv -Path $OutputPath -NoTypeInformation -Encoding UTF8
$Results | Sort-Object LastTaskResult, NumberOfMissedRuns -Descending | Format-Table -AutoSize
# Separate evidence pass for recent Task Scheduler operational events.
Get-WinEvent -LogName 'Microsoft-Windows-TaskScheduler/Operational' -MaxEvents 100 |
Select-Object TimeCreated, Id, ProviderName, MessageValidation
Every scoped host has a task inventory or an access/error note.
Failed and disabled tasks are classified by owner, business impact, and next action.
Any later task change has before-state evidence and a rollback plan.
Reporting
export scheduled task inventory and run results to CSV
attach recent Task Scheduler operational events to incident or maintenance tickets
promote repeated use into an automation reliability report
Safety Notes
This inventory is read-only and should not enable, disable, start, stop, or edit tasks.
Do not change task credentials or triggers without owner approval and rollback evidence.
