Microsoft.Windows.ScriptPassThroughPropertyBagProbe

System Center

Updated: May 18, 2012

Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager

The Microsoft.Windows.ScriptPassThroughPropertyBagProbe probe action module type is a trigger-only module that produces System.PropertyBagData as output.

Usage

This module is used when you have a module that requires input, but you want to use it in a Task or an On Demand monitor. This module allows another module to be used in an on-demand manner without requiring input.

Type Definition

<ProbeActionModuleType ID="Microsoft.Windows.ScriptPassThroughPropertyBagProbe" Accessibility="Public" Batching="false" PassThrough="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.CommandExecuterSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="ScriptName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="Arguments" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="ScriptBody" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SecureInput" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:maxLength value="256" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:element>
    <xsd:element name="TimeoutSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="EventPolicy" type="CommandExecuterEventPolicyType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Arguments" Selector="$Config/Arguments$" ParameterType="string" />
    <OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation Isolation="Any">
    <Composite>
      <MemberModules>
        <ProbeAction ID="Script" TypeID="Microsoft.Windows.ScriptPassThroughProbePropertyBagBase">
          <ApplicationName>%windir%\system32\cscript.exe</ApplicationName>
          <WorkingDirectory />
          <CommandLine>/nologo "$Config/ScriptName$" $Config/Arguments$</CommandLine>
          <SecureInput>$Config/SecureInput$</SecureInput>
          <TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
          <RequireOutput>true</RequireOutput>
          <Files>
            <File>
              <Name>$Config/ScriptName$</Name>
              <Contents>$Config/ScriptBody$</Contents>
              <Unicode>true</Unicode>
            </File>
          </Files>
          <OutputType>System.PropertyBagData</OutputType>
          <DefaultEventPolicy>
            <StdOutMatches Operator="DoesNotMatchRegularExpression">{&lt;DataItem.+/DataItem\b*&gt;}|{&lt;DataItem.*/&gt;}</StdOutMatches>
            <StdErrMatches>\a+</StdErrMatches>
            <ExitCodeMatches>[^0]+</ExitCodeMatches>
          </DefaultEventPolicy>
          <EventPolicy>$Config/EventPolicy$</EventPolicy>
        </ProbeAction>
      </MemberModules>
      <Composition>
        <Node ID="Script" />
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.PropertyBagData</OutputType>
  <TriggerOnly>true</TriggerOnly>
</ProbeActionModuleType>

Parameters

The Microsoft.Windows.ScriptPassThroughPropertyBagProbe module supports the configuration parameters described in the following table:

 

Parameter Type Overrideable Description

ScriptName

String

False

Required parameter. Contains the file name of the script (including the extension) that identifies the script type.

Arguments

String

True

Required parameter. Contains the arguments to be supplied to the script on execution.

ScriptBody

String

False

Required parameter. Contains the script contents. If the script contains XML characters that must be escaped, it is recommended that the entire script be wrapped in a CDATA element.

SecureInput

String

False

Optional parameter. Contains the data to be passed to the script in a secure method. This is used to provide passwords to the script to be used during execution. Maximum length of the string is 256 characters.

TimeoutSeconds

Integer

True

Required parameter. Specifies the time the script is allowed to run before being closed by the module and marked as failed.

EventPolicy

CommandExecuterEventPolicyType

False

Optional parameter. Defines the expected output and the behavior based on unexpected output from the script

For more information about all parameters of this module, see Microsoft.Windows.ScriptProbeAction.

Composition

The Microsoft.Windows.ScriptPassThroughPropertyBagProbe module is a composite module that contains the member module described in the following table.

 

Workflow Run Order Module Type Usage

1

Microsoft.Windows.ScriptPassThroughProbePropertyBagBase

Internal module for Microsoft use only.

Related Modules

 

Module Type Usage

Microsoft.Windows.ScriptPropertyBagProbe

Used to gather data from a script on a monitored computer and return a property bag.

External Module References

None

Sample

The following XML example …

Information

 

   

Module Type

ProbeActionModuleType

Input Type

None

Output Type

System.PropertyBagData

Implementation

Composite

Library

Microsoft.Windows.Library

 
Show: