Configuring the Windows Command adapter
In addition to targets defined in the adapter configuration, the Windows Command adapter can have dynamic targets defined in each adapter request. If a dynamic target will always be defined in the Windows Command adapter request, a configuration node of <config/> can be used in the adapter configuration. BMC recommends that you do not include unused elements in the adapter configuration because they might cause errors.
The remote service starts once you provide the credentials in the adapter configuration or request depending on the access rights.
The Windows Command adapter configuration supports the SSH functionality along with the xCmd utility. With the SSH functionality, a non-administrator user can execute commands on the remote computer if the SSH server is installed and running on the target computer.
Adapter type: ro-adapter-windows-command_vv.rr.nn
Default adapter name: WindowsCommandAdapter
To configure the Windows Command adapter, see Configuring base adapters.
The following table describes the adapter configuration elements for the Windows Command adapter that you can specify by using the form view, XML view, or both. You cannot use the form view to configure elements and attributes that do not have an entry in the "UI label" column.
Configuration node elements for the Windows Command adapter
The following figure shows an XML template for the Windows command adapter configuration.
XML template of the Windows command adapter configuration
<target></target>
<user-name></user-name>
<password encryption-type=""></password>
<logon-with-user-credentials></logon-with-user-credentials>
<protocol></protocol>
<executable-directory></executable-directory>
<executable></executable>
<escape-double-quotes></escape-double-quotes>
<protocol></protocol>
<script-file-path></script-file-path>
<character-set></character-set>
<max-request-queue-size></max-request-queue-size>
<debug-utility></debug-utility>
</config>
The following figure shows an XML sample for the adapter configuration for the Windows Command adapter using the xCmd utility.
XML sample of the Windows command adapter configuration using the xCmd utility
<target>abc2</target>
<user-name>Administrator</user-name>
<password encryption-type="Plain">test</password>
<character-set>gb18030</character-set>
<logon-with-user-credentials>true</logon-with-user-credentials>
<protocol>default</protocol>
<script-file-path>local</script-file-path>
</config>
The following figure shows an XML sample for the adapter configuration for the Windows Command adapter using the ssh utility.
XML sample of the Windows command adapter configuration using SSH
<target>abc2</target>
<user-name>Administrator</user-name>
<password encryption-type="Plain">test</password>
<character-set>gb18030</character-set>
<protocol>ssh</protocol>
</config>
The following figure shows an XML sample for the adapter configuration for the Windows Command adapter when the <impersonate-user> is set to true.
XML sample for the adapter configuration for the Windows Command adapter when the <impersonate-user> is set to true
<target>vm-yyy-w2k</target>
<user-name>domain.local\domainuser1</user-name>
<password>password</password>
<protocol>default</protocol>
<service-launch-mode>64bit</service-launch-mode>
<logon-with-user-credentials>true</logon-with-user-credentials>
<impersonate-user>true</impersonate-user>
</config>
The following figure shows the XML sample for the adapter configuration for the Windows Command adapter when the <service-launch-mode> is 64-bit.
XML sample for the adapter configuration for the Windows Command adapter when the <service-launch-mode> is 64-bit
<target>vm-yyy-w2k</target>
<user-name>domain.local\domainuser1</user-name>
<password>password</password>
<protocol>default</protocol>
<service-launch-mode>64bit</service-launch-mode>
<logon-with-user-credentials>true</logon-with-user-credentials>
<impersonate-user>false</impersonate-user>
</config>
The Windows Command adapter supports the 64-bit Windows 2008 operating system. By default, the firewall is enabled on a 64-bit Windows 2008 computer, which disables the Internet Control Message Protocol (ICMP). If the adapter does not execute commands on the target computer after enabling the adapter (that supports a 64-bit Windows 2008 operating system), you must enable file sharing and the ICMP used by the xCmd.
To enable the ICMP on the target computer
- Type netsh firewall set icmpsetting 8 enable on the Windows command line and press Enter to enable the ICMP on the computer.
To enable file sharing
- On the 64-bit Windows 2008 computer, navigate to Start => Network => Network and Sharing centre.
- On the Network and Sharing centre page, enable the File sharing option, and click Save to enable file sharing.