CommandExecuterFilesType
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
The CommandExecuterFilesType complex data type contains a list of text-based files, which could be scripts, batch files, Power Shell scripts or any type of file content.
Schema Definition
<xsd:complexType name="CommandExecuterFilesType">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="File">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Name">
<xsd:simpleType>
<xsd:restriction base="xsd:ID">
<xsd:minLength value="1"/>
<xsd:maxLength value="260"/>
<xsd:pattern value="[^\?\*\+\|\{\}\(\)]+"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Contents" type="xsd:string"/>
<xsd:element minOccurs="0" maxOccurs="1" name="Unicode" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
Remarks
The CommandExecuterFilesType data type contains a list of text-based files, which could be scripts, batch files, Power Shell scripts or any type of file content. These files are put in the directory from which the command is run. The directory is under the Health Service State directory that is used by the health service. All files that form a single module instance are extracted into a single directory.
To start the command in the directory where the files are extracted, leave the working directory empty. The files are available to be used as required in your probe module.
One or more files can be specified and each must have three parameters:
Parameter | Type | Description |
---|---|---|
Name |
String |
Contains the file name of the file that is created. |
Contents |
String |
Contains the contents of the file. |
Unicode |
Boolean |
Optional. Specifies whether the contents of the file are Unicode. This parameter defaults to true. Because the command interpreter understands only ASCII files, this parameter should be set to false if you are extracting a .cmd or .bat file. |
Example
The following XML sample shows a simple example of the Files parameter, which is of the CommandExecuterFilesType data type.:
<Files>
<File>
<Name>StartService.cmd</Name>
<Contents>
<![CDATA[
if "%OSVer%"=="W2K" goto Win2K
sc \\%1 start %2
goto end
:Win2K
net start %2
goto end
:end
]]>
</Contents>
<Unicode>false</Unicode>
</File>
</Files>
Information
Schema Type |
System.CommandExecuterSchema |
Library |
System.Library |