PowerShell 指令碼序列化物件探查 (僅限觸發程序)

Microsoft.Windows.PowerShellTriggerOnlyProbe (ProbeActionModuleType)

當 PowerShell 指令碼傳回的螢幕輸出和物件都需要完整存取權時,請使用此模組作為執行 PowerShell 指令碼的探查動作。 此模組會傳回 Microsoft.Windows.SerializedObjectData 類型的資料。 您應該使用此模組來實作自訂單位監視類型的 OnDemandDetection。 SerializationDepth 參數的設定愈小愈好 (3 或更小),以避免產生的資料項目變得太大。 StrictErrorHandling 參數通常應設為 "false",以避免因為探索失敗而導致整個工作流程卸載。 如需此模組與 SerializedObjectData 類型的詳細資訊,請參閱線上版<Operations Manager 模組類型參考>。

Element properties:

TypeProbeActionModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeMicrosoft.Windows.SerializedObjectData

Member Modules:

ID Module Type TypeId RunAs 
PowerShellProbe ProbeAction Microsoft.Windows.PowerShellTriggerOnlyProbeBase Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
TimeoutSecondsint$Config/TimeoutSeconds$逾時秒數

Source Code:

<ProbeActionModuleType ID="Microsoft.Windows.PowerShellTriggerOnlyProbe" Accessibility="Public">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>Microsoft.Windows.PowerShellSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="ScriptName" type="NonNullString"/>
<xsd:element name="ScriptBody" type="NonNullString"/>
<xsd:element name="SnapIns" type="SnapInsType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Parameters" type="NamedParametersType" minOccurs="0" maxOccurs="1"/>
<xsd:element name="TimeoutSeconds" type="xsd:integer"/>
<xsd:element name="StrictErrorHandling" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SerializationDepth" type="xsd:integer" minOccurs="0" maxOccurs="1"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<ProbeAction ID="PowerShellProbe" TypeID="Microsoft.Windows.PowerShellTriggerOnlyProbeBase">
<ScriptName>$Config/ScriptName$</ScriptName>
<ScriptBody><Script>$Config/ScriptBody$</Script></ScriptBody>
<SnapIns>$Config/SnapIns$</SnapIns>
<Parameters>$Config/Parameters$</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<OutputType>SerializedObjectData_OpsMgrSerialization</OutputType>
<StrictErrorHandling>$Config/StrictErrorHandling$</StrictErrorHandling>
<SerializationDepth>$Config/SerializationDepth$</SerializationDepth>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="PowerShellProbe"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>Microsoft.Windows.SerializedObjectData</OutputType>
<TriggerOnly>true</TriggerOnly>
</ProbeActionModuleType>