代理管理诊断和启动运行状况服务

Microsoft.SystemCenter.AgentManagement.DiagnosticTask.DiagnoseAndStartHealthService (ProbeActionModuleType)

Element properties:

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

Member Modules:

ID Module Type TypeId RunAs 
StartService ProbeAction System.CommandExecuterProbe Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
ComputerNamestring$Config/ComputerName$计算机名
ServiceNamestring$Config/ServiceName$服务名称

Source Code:

<ProbeActionModuleType ID="Microsoft.SystemCenter.AgentManagement.DiagnosticTask.DiagnoseAndStartHealthService" Accessibility="Internal" RunAs="SCLibrary!Microsoft.SystemCenter.AgentManagementAccount" Batching="false" PassThrough="false">
<Configuration>
<xsd:element name="ComputerName" type="xsd:string"/>
<xsd:element name="ServiceName" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="ComputerName" Selector="$Config/ComputerName$" ParameterType="string"/>
<OverrideableParameter ID="ServiceName" Selector="$Config/ServiceName$" ParameterType="string"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<ProbeAction ID="StartService" TypeID="System!System.CommandExecuterProbe">
<ApplicationName>%WinDir%\System32\sc.exe</ApplicationName>
<WorkingDirectory/>
<CommandLine>\\$Config/ComputerName$ start $Config/ServiceName$</CommandLine>
<TimeoutSeconds>60</TimeoutSeconds>
<RequireOutput>true</RequireOutput>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="StartService"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.CommandOutput</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>