Enable and Start Health Service Write Action

Microsoft.SystemCenter.HealthService.RecoveryTask.EnableAndStartServiceAction (WriteActionModuleType)

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityInternal
RunAsMicrosoft.SystemCenter.AgentManagementAccount
InputTypeSystem.BaseData
OutputTypeSystem.CommandOutput

Member Modules:

ID Module Type TypeId RunAs 
EnableService WriteAction Microsoft.Windows.ServiceControlManager.ConfigureStartupType Default
ReStartService WriteAction Microsoft.SystemCenter.AgentManagement.RestartService Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
ComputerNamestring$Config/ComputerName$Computer Name

Source Code:

<WriteActionModuleType ID="Microsoft.SystemCenter.HealthService.RecoveryTask.EnableAndStartServiceAction" Accessibility="Internal" RunAs="SCLibrary!Microsoft.SystemCenter.AgentManagementAccount" Batching="false">
<Configuration>
<xsd:element name="ComputerName" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="ComputerName" Selector="$Config/ComputerName$" ParameterType="string"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="EnableService" TypeID="Windows!Microsoft.Windows.ServiceControlManager.ConfigureStartupType">
<ComputerName>$Config/ComputerName$</ComputerName>
<ServiceName>HealthService</ServiceName>
<StartupType>Auto</StartupType>
</WriteAction>
<WriteAction ID="ReStartService" TypeID="Microsoft.SystemCenter.AgentManagement.RestartService">
<ComputerName>$Config/ComputerName$</ComputerName>
<ServiceName>HealthService</ServiceName>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="ReStartService"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.CommandOutput</OutputType>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>