Add TaskCache count summary and Get-TaskCacheSummary diagnostic #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/taskcache-summary-diagnostic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Adds tooling to distinguish real TaskCache corruption from a false alarm before any
destructive repair, motivated by an MVCTWS01 run that reported 197
OrphanTreeEntryfindings(mostly built-in Windows tasks).
Test-ScheduledTaskHealth.ps1now emits a leading Summary record (Category = Summary)with the count of Tree task nodes,
TaskCache\TasksGUID keys, and on-disk XML files, plus aper-category finding tally. When
TaskCache\Tasksholds far fewer entries than the Treereferences (which is what produces a large batch of
OrphanTreeEntryfindings), it raises awarning: that pattern is either severe TaskCache damage or an incomplete enumeration, and
must be verified before repairing.
Get-TaskCacheSummary.ps1: a quick, read-only count comparison of the three TaskCachesources (Tree, Tasks, on-disk XML), with
TreeWithoutTasks/TasksWithoutTreetotals, aninterpreted
Assessment, and optional per-GUID spot-checks (-CheckGuid) that confirmdirectly whether a flagged orphan's
Taskskey really is absent.Fixes #
How was this tested?
counts, the assessment text, and the
-CheckGuidspot-checks (TasksKeyExistsTrue/False),and that
Test-ScheduledTaskHealth.ps1leads with the Summary record.Checklist