Skip to main content

Get Hybrid Machine Command

Get a run command of a hybrid machines by a given ID.

External Documentation

To learn more, visit the Azure documentation.

Parameters

ParameterDescription
Machine NameThe name of the hybrid machine. Can be obtained by the List Hybrid Machines action.
Resource Group NameThe name of the resource group.
Run Command NameThe name of the run command. Can be obtained by the List Hybrid Machine Commands action.
Subscription IDThe ID of the target subscription.

Example Output

{
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/runcommands/myRunCommand",
"name": "myRunCommand",
"type": "Microsoft.HybridCompute/machines/runcommands",
"location": "eastus2",
"tags": {
"tag1": "value1",
"tag2": "value2"
},
"properties": {
"source": {
"script": "Write-Host Hello World!"
},
"parameters": [
{
"name": "param1",
"value": "value1"
},
{
"name": "param2",
"value": "value2"
}
],
"protectedParameters": [],
"asyncExecution": false,
"runAsUser": "user1",
"timeoutInSeconds": 3600,
"provisioningState": "Succeeded",
"instanceView": {
"executionState": "Succeeded",
"executionMessage": "",
"exitCode": 0,
"output": "Hello World",
"error": "",
"startTime": "2023-06-15T20:48:41.4641785+00:00",
"endTime": "2023-06-15T20:48:41.4641785+00:00"
}
}
}

Automation Library Example

Get Hybrid Machine Command with Azure and Send Results Via Email

Automation LibraryPreview this Automation on desktop