Reinstall Health Service (triggered from Diagnostic)

Microsoft.SystemCenter.HealthService.Recovery.AutoReinstallAgent (Recovery)

Remotely reinstalls the Health Service on the target computer when the "Check Health Service Service Control Manager Configuration" diagnostic has run.

Element properties:

TargetMicrosoft.SystemCenter.HealthServiceWatcher
MonitorMicrosoft.SystemCenter.HealthService.Heartbeat
Reset MonitorFalse
RemotableTrue
Timeout300
CategoryMaintenance
Enabledfalse
AccessibilityInternal
CommentRepair remote agent. Automatic based on Diagnostic

Member Modules:

ID Module Type TypeId RunAs 
ReinstallAgent WriteAction Microsoft.SystemCenter.AgentManagement.AgentManagerAction Default

Source Code:

<Recovery ID="Microsoft.SystemCenter.HealthService.Recovery.AutoReinstallAgent" Comment="Repair remote agent. Automatic based on Diagnostic" 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>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Diagnostic/DataItem/Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">8</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<WriteAction ID="ReinstallAgent" TypeID="Microsoft.SystemCenter.AgentManagement.AgentManagerAction">
<ComputerName>$Target/Property[Type="SCLibrary!Microsoft.SystemCenter.HealthServiceWatcher"]/HealthServiceName$</ComputerName>
<PrincipalName>$Target/Property[Type="SCLibrary!Microsoft.SystemCenter.HealthServiceWatcher"]/HealthServiceName$</PrincipalName>
<Operation>4</Operation>
<ManagementGroup>$Target/ManagementGroup/Name$</ManagementGroup>
<ManagementServerDNS>$Target/Host/Property[Type="SCLibrary!Microsoft.SystemCenter.HealthServiceWatchersGroup"]/RMSPrincipalName$</ManagementServerDNS>
<ManagementServerAD>$Target/Host/Property[Type="SCLibrary!Microsoft.SystemCenter.HealthServiceWatchersGroup"]/RMSPrincipalName$</ManagementServerAD>
<InstallPath/>
<Port>5723</Port>
<EnableErrorReporting>0</EnableErrorReporting>
<QueueErrorReports>0</QueueErrorReports>
<InstallUserAndDomain/>
<InstallPassword/>
<ActionsUserAndDomain/>
<ActionsPassword/>
</WriteAction>
</Recovery>