The remote command feature allows you to send commands to cloud computers without connecting through an Alibaba Cloud Workspace terminal to perform routine maintenance tasks quickly. You can send commands to a single cloud computer, multiple cloud computers, or aShared Cloud Computer.
Background information
You can use Cloud Assistant to remotely run Bat, PowerShell, or Shell commands without connecting to your cloud computers. This helps you perform tasks such as running automated O&M scripts and installing or uninstalling software.
The Cloud Assistant agent is installed and running on cloud computers by default. Do not stop this service to ensure that all features function correctly. The service is named Aliyun Assist Service on Windows cloud computers and aliyun on Linux cloud computers.
Prerequisites
The cloud computer is in theRunning state.
Send commands to a single cloud computer
Log on to the Elastic Desktop Service Enterprise console.
In the left-side navigation pane, chooseResource Management > Cloud Computers.
In the top navigation bar, select a region.
On the Cloud Computers page, find the target cloud computer and use one of the following methods to send a remote command:
In theActions column, clickMore and then selectSend Remote Commands.
Click the Cloud Computer ID, click theCommand Execution Details tab, and then clickSend Remote Commands.
In theSend Remote Commands dialog box, configure the following parameters and clickExecute.
Parameter
Description
Command Type
For a Windows cloud computer, select PowerShell or Bat.
For a Linux cloud computer, select Shell.
Command Content
Enter the command that you want to run.
NoteOnly non-interactive commands that return a result after a single execution are supported.
After the command is executed, you can enter another command in theCommand Content text box and execute it.
Send commands to multiple cloud computers
Log on to the Elastic Desktop Service Enterprise console.
Use one of the following methods:
Cloud computers
In the left-side navigation pane, chooseResource Management > Cloud Computers.
On the Cloud Computers page, clickSend Remote Commands in the upper-left corner.
Remote commands
In the left-side navigation pane, choose.
On the O&M Management > Remote Command page, click Batch Send Remote Commands.
On theBatch Send Remote Commands page, configure the following parameters and clickConfirm.
Parameter
Description
Command Configuration
Command Type
For a Windows cloud computer, select PowerShell or Bat.
For a Linux cloud computer, select Shell.
Command Content
Enter the command that you want to run.
NoteOnly non-interactive commands that return a result after a single execution are supported.
Execute as End User
If you enable this option, the remote command runs in the end-user session of the cloud computer. This is useful for scenarios that require a GUI or interaction with the user environment. When this option is enabled, the cloud computer list shows only cloud computers with connected users.
NoteOnly PowerShell and Bat commands are supported. Shell commands are not supported.
Select Cloud Computers
Select the cloud computers on which to run the remote command.
NoteYou can select only cloud computers that are in the Running state.
You can select up to 500 cloud computers in the same region. If you select more than 300 cloud computers at a time, the system automatically splits the task into multiple command executions. You can query the execution results by using the command execution ID.
You can filter cloud computers byCloud Computer Name,Cloud Computer ID,Office Network ID,Username, orAbout to Expire.
After the command is executed, you can enter another command in theCommand Content text box and execute it.
Send commands to a shared cloud computer
In the left-side navigation pane, choose.
In the top navigation bar, select a region.
On theMany-to-Many tab of theShared Cloud Computer page, find the target many-to-many shared cloud computer and click its Shared Cloud Computer ID.
On theCommand Execution Details tab, clickSend Remote Commands.
In theSend Remote Commands dialog box, configure the following parameters and clickExecute.
Parameter
Description
command type
For a Windows cloud computer, select PowerShell or Bat.
For a Linux cloud computer, select Shell.
Select cloud computers
Select the cloud computers on which to run the command.
All: Sends the command to allShared Cloud Computer in theRunning state within the many-to-many shared cloud computer pool.
Specific: From the drop-down list, select theShared Cloud Computer on which you want to run the command.
command content
Enter the command that you want to run.
NoteOnly non-interactive commands that return a result after a single execution are supported.
After the command is executed, you can enter another command in theCommand Content text box and execute it.
Next steps
After a command runs, you can view information such as its execution status, command ID, content, and execution time.
Scenario | Method |
View command execution status for cloud computers |
|
View command execution status for aShared Cloud Computer | On theShared Cloud Computer page, find the target many-to-many shared cloud computer pool, click its Shared Cloud Computer ID, and then click theCommand Execution Details tab to view information about sent commands. |