The "Windows Task Scheduler and PS Job Monitoring" management pack uses PowerShell to discover and monitor scheduled tasks.
If Powershell is not installed, the management pack will fail to discover tasks and jobs.
PowerShell Version >= 2.0 is required for scheduled task and PowerShell scheduled job monitoring.
Download and install PowerShell 2.0 or later on this agent computer from www.microsoft.com
Target | Microsoft.Windows.OperatingSystem | ||
Parent Monitor | System.Health.ConfigurationState | ||
Category | ConfigurationHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Custom.Windows.TaskSchedulerV2.Registry2StateMonitorType | ||
Remotable | False | ||
Accessibility | Internal | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Custom.TaskSchedulerV2.PowerShellCompatible.Monitor" Accessibility="Internal" Enabled="true" 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.PowerShellCompatible.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="PS2_Compatible" MonitorTypeStateID="FirstCondition" HealthState="Success"/>
<OperationalState ID="NotPS2_Compatible" MonitorTypeStateID="SecondCondition" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<WindowsVersionRegEx>^6\.</WindowsVersionRegEx>
<RegistryAttributeDefinitions>
<!-- PoSh 1.0 & 2.0 -->
<RegistryAttributeDefinition>
<AttributeName>PSCompatibleVersionV1</AttributeName>
<Path>SOFTWARE\Microsoft\Powershell\1\PowerShellEngine\PSCompatibleVersion</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
<RegistryView>Default</RegistryView>
</RegistryAttributeDefinition>
<!-- PoSh >= 3.0 -->
<RegistryAttributeDefinition>
<AttributeName>PSCompatibleVersionV3</AttributeName>
<Path>SOFTWARE\Microsoft\Powershell\3\PowerShellEngine\PSCompatibleVersion</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
<RegistryView>Default</RegistryView>
</RegistryAttributeDefinition>
</RegistryAttributeDefinitions>
<Frequency>3600</Frequency>
<FirstExpression>
<Or>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Values/PSCompatibleVersionV1</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>2\.0</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Values/PSCompatibleVersionV3</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>.\..</Pattern>
</RegExExpression>
</Expression>
</Or>
</FirstExpression>
<SecondExpression>
<And>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Values/PSCompatibleVersionV1</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>2\.0</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Values/PSCompatibleVersionV3</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>.\..</Pattern>
</RegExExpression>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>