UNIX/Linux Shell Command Property Bag Probe Action

Unix.Authoring.ShellCommand.PropertyBag.ProbeAction (ProbeActionModuleType)

A probe action module type that runs a shell command through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell command.

Element properties:

TypeProbeActionModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.PropertyBagData

Member Modules:

ID Module Type TypeId RunAs 
InvokeProbe ProbeAction Unix.Authoring.ShellCommand.ProbeAction Default
PSProbe ProbeAction Microsoft.Windows.PowerShellPropertyBagProbe Default
Filter ConditionDetection System.ExpressionFilter Default

Source Code:

<ProbeActionModuleType ID="Unix.Authoring.ShellCommand.PropertyBag.ProbeAction" Accessibility="Public" Batching="false" PassThrough="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TargetSystem" type="xsd:string" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ShellCommand" type="xsd:string" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Timeout" type="xsd:integer" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UserName" type="xsd:string" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Password" type="xsd:string" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PSScriptName" type="xsd:string" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PSScriptBody" type="xsd:string" minOccurs="1"/>
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<ProbeAction ID="InvokeProbe" TypeID="Unix.Authoring.ShellCommand.ProbeAction">
<TargetSystem>$Config/TargetSystem$</TargetSystem>
<ShellCommand>$Config/ShellCommand$</ShellCommand>
<Timeout>$Config/Timeout$</Timeout>
<UserName>$Config/UserName$</UserName>
<Password>$Config/Password$</Password>
</ProbeAction>
<ProbeAction ID="PSProbe" TypeID="Windows!Microsoft.Windows.PowerShellPropertyBagProbe">
<ScriptName>$Config/PSScriptName$</ScriptName>
<ScriptBody><Script>$Config/PSScriptBody$</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>StdOut</Name>
<Value>$Data///*[local-name()="StdOut"]$</Value>
</Parameter>
<Parameter>
<Name>StdErr</Name>
<Value>$Data///*[local-name()="StdErr"]$</Value>
</Parameter>
<Parameter>
<Name>ReturnCode</Name>
<Value>$Data///*[local-name()="ReturnCode"]$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>300</TimeoutSeconds>
</ProbeAction>
<ConditionDetection ID="Filter" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<Exists>
<ValueExpression>
<XPathQuery Type="String">//*[local-name()="StdOut"]</XPathQuery>
</ValueExpression>
</Exists>
</Expression>
<Expression>
<Exists>
<ValueExpression>
<XPathQuery Type="String">//*[local-name()="StdErr"]</XPathQuery>
</ValueExpression>
</Exists>
</Expression>
<Expression>
<Exists>
<ValueExpression>
<XPathQuery Type="String">//*[local-name()="ReturnCode"]</XPathQuery>
</ValueExpression>
</Exists>
</Expression>
</And>
</Expression>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="PSProbe">
<Node ID="Filter">
<Node ID="InvokeProbe"/>
</Node>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>