Run a UNIX/Linux Shell Command

Microsoft.Unix.ShellCommand.Task.Template (Template)

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

Source Code:

<Template ID="Microsoft.Unix.ShellCommand.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="Command" 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:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeOutInMS" type="xsd:string"/>
</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.ShellCommand.ProbeAction">
<TargetSystem>$TemplateConfig/TargetSystem$</TargetSystem>
<UserName>$TemplateConfig/UserName$</UserName>
<Password>$TemplateConfig/Password$</Password>
<ShellCommand>$TemplateConfig/Command$</ShellCommand>
<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>