Microsoft.Windows.PowerShellDiscoveryProbe
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
Microsoft.Windows.PowerShell.DiscoveryProbe probe action module runs a Windows PowerShell script and returns System.Discovery.Data data.
Usage
The Microsoft.Windows.PowerShell.DiscoveryProbe module is generally only intended to be used as a part of a custom composite module type definition.
Type Definition
<ProbeActionModuleType ID="Microsoft.Windows.PowerShellDiscoveryProbe" 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"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<ProbeAction ID="PowerShellProbe" TypeID="Microsoft.Windows.PowerShellDiscoveryProbeBase">
<ScriptName>$Config/ScriptName$</ScriptName>
<ScriptBody>$Config/ScriptBody$</ScriptBody>
<SnapIns>$Config/SnapIns$</SnapIns>
<Parameters>$Config/Parameters$</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<OutputType>DiscoveryData</OutputType>
<StrictErrorHandling>$Config/StrictErrorHandling$</StrictErrorHandling>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="PowerShellProbe" />
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>
Parameters
The Microsoft.Windows.PowerShell.DiscoveryProbe module supports the following configuration parameters:
Parameter | Type | Description |
---|---|---|
ScriptName |
String |
Specifies the logical name of the Windows PowerShell script to be run. This value will be used in event logs and debug traces to identify the script. |
ScriptBody |
String |
Contains the Windows PowerShell script to be run. |
SnapIns |
Optional. Contains a list of one or more Windows PowerShell snap-ins. |
|
Parameters |
String |
Specifies a set of Name/Value pairs to be used by the Windows PowerShell script as parameters. This value can be a literal string, a $Target reference, a $MPElement reference, or a $Data reference. |
TimeOutSeconds |
Integer |
Specifies the maximum number of seconds to allow the script to execute before the script is terminated. |
StrictErrorHandling |
Boolean |
Optional. Specifies whether to treat script errors as fatal errors instead of warnings. This should always be set to false in the case of discoveries and should only be true for task workflows, to allow the script error to be raised via the task status. The default value is false. |
For more information on the configuration parameters for the Microsoft.Windows.PowerShell.DiscoveryProbe module, see Windows PowerShell.
Composition
The Microsoft.Windows.PowerShell.DiscoveryProbe module is a composite module that contains only one internal module.
Related Modules
None.
External Module References
The Microsoft.Windows.PowerShell.DiscoveryProbe module is a member of the following modules:
Module Type | Library | Usage |
---|---|---|
Microsoft.Windows.Library |
A data source module that runs a Windows PowerShell script to gather and return System.Discovery.Data at a timed interval. |
Sample
The following example shows how this module is used in the definition of the Microsoft.Windows.TimedPowerShell.DiscoveryProvider data source to act a reusable provider of discovery data from Windows PowerShell scripts that are run on a regular schedule:
<DataSourceModuleType ID="Microsoft.Windows.TimedPowerShell.DiscoveryProvider" Accessibility="Public">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>Microsoft.Windows.PowerShellSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="IntervalSeconds" type="xsd:int" />
<xsd:element name="SyncTime" type="xsd:string" />
<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"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />
<OverrideableParameter ID="SyncTime" Selector="$Config/SyncTime$" ParameterType="string" />
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource TypeID="System!System.Discovery.Scheduler" ID="DS1">
<Scheduler>
<SimpleReccuringSchedule>
<Interval>$Config/IntervalSeconds$</Interval>
<SyncTime>$Config/SyncTime$</SyncTime>
</SimpleReccuringSchedule>
<ExcludeDates />
</Scheduler>
</DataSource>
<ProbeAction TypeID="Microsoft.Windows.PowerShellDiscoveryProbe" ID="PSScript">
<ScriptName>$Config/ScriptName$</ScriptName>
<ScriptBody>$Config/ScriptBody$</ScriptBody>
<SnapIns>$Config/SnapIns$</SnapIns>
<Parameters>$Config/Parameters$</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<StrictErrorHandling>$Config/StrictErrorHandling$</StrictErrorHandling>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="PSScript">
<Node ID="DS1" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>
Information
Module Type |
|
Input Type |
|
Output Type |
|
Implementation |
Composite |
Library |
Microsoft.Windows.Library |