Skip to main content

Create Or Update Hybrid Machine Command

danger

This action has been deprecated and will no longer be available in new workflows.

Create or Update a run command of a hybrid machines by a given ID.

Basic Parameters

ParameterDescription
LocationThe geo-location where the resource lives.
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 that will be created or updated. Can be obtained by the List Hybrid Machine Commands action.
Subscription IDThe ID of the target subscription.

Advanced Parameters

ParameterDescription
Async ExecutionIf set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
Error Blob Managed IdentityUser-assigned managed identity that has access to errorBlobUri storage blob.
Error Blob URISpecifies the Azure storage blob where script error stream will be uploaded.
Output Blob Managed IdentityUser-assigned managed identity that has access to outputBlobUri storage blob.
Output Blob URISpecifies the Azure storage blob where script output stream will be uploaded.
ParametersThe parameters used by the script. For example:
[  {    "name": "param1",    "value": "value1"  },  {    "name": "param2",    "value": "value2"  }]
Protected ParametersThe protected parameters used by the script. For example:
[  {    "name": "param1",    "value": "value1"  },  {    "name": "param2",    "value": "value2"  }]
Run As UserSpecifies the user account password on the machine when executing the run command.
Run As User's PasswordSpecifies the user account password on the machine when executing the run command.
SourceThe source object of the run command script.
TagsResource tags to apply on the run command.
TimeoutThe timeout in seconds to execute the run command.

Example Output

{
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/runcommands/myRunCommand",
"name": "myRunCommand",
"type": "Microsoft.HybridCompute/machines/runcommands",
"location": "eastus2",
"properties": {
"source": {
"script": "Write-Host Hello World!"
},
"parameters": [
{
"name": "param1",
"value": "value1"
},
{
"name": "param2",
"value": "value2"
}
],
"asyncExecution": false,
"runAsUser": "user1",
"timeoutInSeconds": 3600,
"outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt",
"errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt",
"provisioningState": "Succeeded"
}
}

Workflow Library Example

Create or Update Hybrid Machine Command with Azure and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop