You can send remote commands to perform O&M operations on one or more instances without logging on to the instances.


Background information

You must use Cloud Assistant to send and run remote commands, and the remote commands consume the quota of Cloud Assistant commands. For more information about Cloud Assistant and its limits, see Overview.


  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Use one of the following methods to send remote commands:
    • To send a remote command to a single instance, find the instance on the Instances page and click the ID of the instance to go to the instance details page. Click the Remote Commands/Files tab and click Send Remote Commands.
    • To send a remote command to multiple instances, go to the Cloud Assistant page by choosing Maintenance & Monitoring > Cloud Assistant in the left-side navigation pane, click Create or Run Command in the upper-right corner, and then select multiple instances in the Select Instances section of the Create Command panel.
  5. In the dialog box that appears, perform the following operations.
    Note If some instances run Linux and others run Windows, you must configure the instances based on their operating systems when you perform batch operations on multiple instances.
    1. Select a command type.
      • Linux instances: Shell is selected by default.
      • Windows instances: Select Bat or PowerShell.
    2. Specify whether to retain commands.
      Note You can view the retained commands on the Cloud Assistant page and run these commands repeatedly. For more information about how to use Cloud Assistant to run remote commands on ECS instances, see Run a command.
    3. In the Command Content code editor, enter a command.
      • The command must be able to return the results of a single execution. Interactions with returned information are not allowed.
      • For more information about shell commands, see View instance configurations.
    4. Click Run.
      • You can click Stop to cancel the execution of a command.
      • After the execution is complete, you can view the command output in the Command Output section.

        To view the command output and execution results of each instance, click the instance ID.

      Note After an execution is complete, you can enter another command in the Command Content code editor to run the command.