Enable and Restart Health Service

Microsoft.SystemCenter.HealthService.Recovery.RemotelyEnableAndRestartHealthService (Recovery)

Remotely enables the Health Service, then starts it on the target computer.

Element properties:

TargetMicrosoft.SystemCenter.HealthServiceWatcher
MonitorMicrosoft.SystemCenter.HealthService.Heartbeat
Reset MonitorFalse
RemotableTrue
Timeout300
CategoryMaintenance
Enabledfalse
AccessibilityInternal
CommentEnable the disabled health service, then start

Member Modules:

ID Module Type TypeId RunAs 
EnableAndStartService WriteAction Microsoft.SystemCenter.AgentManagement.Recovery.EnableAndStartServiceAction Default

Source Code:

<Recovery ID="Microsoft.SystemCenter.HealthService.Recovery.RemotelyEnableAndRestartHealthService" Comment="Enable the disabled health service, then start" Accessibility="Internal" Enabled="false" Target="SCLibrary!Microsoft.SystemCenter.HealthServiceWatcher" Monitor="SC2007!Microsoft.SystemCenter.HealthService.Heartbeat" ResetMonitor="false" ExecuteOnDiagnostic="Microsoft.SystemCenter.HealthService.Diagnostic.QueryHealthService" Remotable="true" Timeout="300">
<Category>Maintenance</Category>
<ConditionDetection ID="Filter" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Diagnostic/DataItem/Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">1</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Diagnostic/DataItem/Property[@Name='StartMode']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">4</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<WriteAction ID="EnableAndStartService" TypeID="Microsoft.SystemCenter.AgentManagement.Recovery.EnableAndStartServiceAction">
<ComputerName>$Target/Property[Type="SCLibrary!Microsoft.SystemCenter.HealthServiceWatcher"]/HealthServiceName$</ComputerName>
</WriteAction>
</Recovery>