Run a UNIX/Linux Script

Microsoft.Unix.Script.Task.Template (Template)

This task runs a Script on the targeted UNIX/Linux Computer.

Source Code:

<Template ID="Microsoft.Unix.Script.Task.Template" Purpose="TaskCreation">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>RuleTemplates!Microsoft.SystemCenter.RuleTemplates.ManagementPackCategoryType</SchemaType>
<SchemaType>RuleTemplates!Microsoft.SystemCenter.RuleTemplates.ManagementPackIdentifiers</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ID" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Name" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Description" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Target" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TargetSystem" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Category" type="ManagementPackCategoryType"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="LocaleId" type="ManagementPackLanguageIdentifier"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Script" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ScriptArgs" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UserName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Password" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeOut" type="xsd:unsignedInt"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeOutInMS" type="xsd:unsignedInt"/>
</Configuration>
<References>
<Reference ID="Unix"/>
<Reference ID="Self"/>
</References>
<Implementation>
<Monitoring>
<Tasks>
<Task ID="$TemplateConfig/ID$" Target="$TemplateConfig/Target$" Accessibility="Public">
<Category>$TemplateConfig/Category$</Category>
<ProbeAction ID="PA" TypeID="$Reference/Self$Microsoft.Unix.Invoke.Script.ProbeAction">
<TargetSystem>$TemplateConfig/TargetSystem$</TargetSystem>
<UserName>$TemplateConfig/UserName$</UserName>
<Password>$TemplateConfig/Password$</Password>
<Script>$TemplateConfig/Script$</Script>
<ScriptArgs>$TemplateConfig/ScriptArgs$</ScriptArgs>
<TimeOut>$TemplateConfig/TimeOut$</TimeOut>
<TimeOutInMS>$TemplateConfig/TimeOutInMS$</TimeOutInMS>
</ProbeAction>
</Task>
</Tasks>
</Monitoring>
<LanguagePacks>
<LanguagePack ID="$TemplateConfig/LocaleId$" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="$TemplateConfig/ID$">
<Name>$TemplateConfig/Name$</Name>
<Description>$TemplateConfig/Description$</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</Implementation>
</Template>