Runs a PowerShell or Batch script on one or more Elastic Cloud Desktop (ECD) instances that run Windows.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| Type |
string |
Yes |
The language type of the O&M script. Valid values:
|
RunPowerShellScript |
| CommandContent |
string |
Yes |
The plaintext or Base64-encoded content of the script. Note
If you specify Base64-encoded script content, set ContentEncoding to Base64. |
ipconfig |
| Timeout |
integer |
No |
The timeout period for running the script, in seconds. Default value: 300. |
3600 |
| ContentEncoding |
string |
No |
The encoding method for the script content. Note
If you specify a value that is not in the enumeration list, the system treats it as PlainText. Valid values:
|
Base64 |
| DesktopId |
array |
Yes |
A list of ECD instance IDs. Valid values of N: 1 to 50. |
|
|
string |
No |
The ID of an ECD instance. |
ecd-7w78ozhjcwa3u**** |
|
| EndUserId |
string |
No |
The ID of the end user. If you specify this parameter, the command runs with the permissions of the end user. Note
The end user must have an active session on the ECD instance. This means the instance must be powered on, the user must have logged on and connected, and the connection must not have been preempted by another user. This parameter is not supported for Linux ECD instances. |
alice |
| CommandRole |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| InvokeId |
string |
The invocation ID of the script. You can call DescribeInvocations and pass in this value to query the execution status of the script. |
t-hz01qgsqj2n**** |
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
Examples
Success response
JSON format
{
"InvokeId": "t-hz01qgsqj2n****",
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.