Scheduled Tasks History Enabled

Custom.TaskSchedulerV2.EventLogEnabled.Monitor (UnitMonitor)

All Tasks History must be enabled or the Scheduled Task MP will not be able to monitor the scheduled tasks.

Knowledge Base article:

Summary

Windows Scheduled Tasks History Enabled Monitor.

The monitor checks if logging to the 'Microsoft-Windows-TaskScheduler/Operational' event log is enabled.

Without logging enabled 'Windows Task Scheduler Monitoring MP' will not be able to properly monitor the scheduled tasks on this computer.

Configuration

Open 'Task Scheduler' (taskschd.msc /s) and:

- 'Enable All Tasks History' from the action pane

Causes

Logging to 'Microsoft-Windows-TaskScheduler/Operational' is not enabled

Resolutions

Enable logging

Element properties:

TargetMicrosoft.Windows.OperatingSystem
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeCustom.Windows.TaskSchedulerV2.Registry2StateMonitorType
RemotableFalse
AccessibilityInternal
Alert Message
Task Scheduler: All Tasks History is disabled
All Tasks History on computer '{0}' is disabled.
The Scheduled Task Management Pack will not be able to monitor the tasks on this computer.

"Enable All Tasks History" on the Task Scheduler's action pane.
RunAsDefault

Source Code:

<UnitMonitor ID="Custom.TaskSchedulerV2.EventLogEnabled.Monitor" Accessibility="Internal" Enabled="false" Target="Windows!Microsoft.Windows.OperatingSystem" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="false" Priority="Normal" TypeID="Custom.Windows.TaskSchedulerV2.Registry2StateMonitorType" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Custom.TaskSchedulerV2.EventLogEnabled.Monitor_AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Log_Enabled" MonitorTypeStateID="FirstCondition" HealthState="Success"/>
<OperationalState ID="Log_Disabled" MonitorTypeStateID="SecondCondition" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<WindowsVersionRegEx>^6\.</WindowsVersionRegEx>
<RegistryAttributeDefinitions>
<RegistryAttributeDefinition>
<AttributeName>IsEnabled</AttributeName>
<Path>SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-TaskScheduler/Operational\Enabled</Path>
<PathType>1</PathType>
<AttributeType>2</AttributeType>
<RegistryView>Default</RegistryView>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<Frequency>3600</Frequency>
<FirstExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Values/IsEnabled</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">1</Value>
</ValueExpression>
</SimpleExpression>
</FirstExpression>
<SecondExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Values/IsEnabled</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="Integer">1</Value>
</ValueExpression>
</SimpleExpression>
</SecondExpression>
</Configuration>
</UnitMonitor>