The xCmd utility allows you to execute commands on remote Windows-based systems without installing any client software. Using xCmd you can:
- Execute multiple commands on the remote computer.
- Execute internal commands such as
dirand so on directly.
The xCmd utility replaced the rctrlx utility, because xCmd has the ability to execute multiple commands simultaneously on the target computer.
The following video (2:06) describes how to use the xCmd utility to execute commands on remote Windows-based systems.
The following adapters use the embedded xCmd utility to execute commands on remote Windows-based systems:
- Windows Command
- Active Directory
- You must have administrative privileges to copy the xCmd utility and run it as a service on the remote computer.
- You must have disabled the user account control (UAC) on the remote computer. Enabling UAC enables the administrator in the Admin Approval Mode, which restricts the utility to launch the xCmd as a service on a remote computer.
- Adapters such as Windows Command and PowerShell that use the xCmd utility work only on peers that are running on a Windows-based computer. Also, for these adapters, the remote host must be a Windows-based computer.
The xCmd utility operates as follows:
- xCmd connects to the ADMIN$ share ( a preexisting share used by the Windows operating system) and the IPC$ share on the target computer.
- The utility copies an embedded service executable file to the directory mapped to the ADMIN$ share.
- The utility then uses a Windows API to install the executable file mentioned in step 2 as a service and starts this service on the remote computer.
- The utility makes a connection to the service over a set of named pipes.
- The utility uses a custom network protocol to send a message to the service to execute the target command by routing the standard output and error streams over the named pipe connections.
- The utility stops the service, uninstalls it, and then deletes the file from the remote computer.
Using xCmd in 64-bit
To use the xCmd utility in 64-bit image mode, you must set the OSARCH flag as 64 in the adapter (PowerShell, Windows Command Line).