Enable and Start Service Write Action Module Type

Microsoft.SystemCenter.AgentManagement.Recovery.EnableAndStartServiceAction (WriteActionModuleType)

This write action is used by recoveries to enable and start the agent service.

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
StartService WriteAction Microsoft.Windows.ServiceControlManager.StartService Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
ComputerNamestring$Config/ComputerName$Computer Name

Source Code:

<WriteActionModuleType ID="Microsoft.SystemCenter.AgentManagement.Recovery.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="StartService" TypeID="Windows!Microsoft.Windows.ServiceControlManager.StartService">
<ComputerName>$Config/ComputerName$</ComputerName>
<ServiceName>HealthService</ServiceName>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="StartService">
<Node ID="EnableService"/>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.CommandOutput</OutputType>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>