Skip to content

Commit 6b89135

Browse files
authored
Merge pull request #51751 from edburns/edburns-MSFT-custom-script-linux-arguments
On branch edburns-MSFT-custom-script-linux-arguments emphasize that y…
2 parents 30a3e25 + 9512806 commit 6b89135

File tree

1 file changed

+39
-8
lines changed

1 file changed

+39
-8
lines changed

articles/virtual-machines/extensions/custom-script-linux.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ Here you can see:
448448
* The extension downloading file and the result of that.
449449
* The command being run and the result.
450450

451-
You can also retrieve the execution state of the Custom Script Extension by using Azure CLI:
451+
You can also retrieve the execution state of the Custom Script Extension including the actual arguments passed as the `commandToExecute` by using Azure CLI:
452452

453453
```azurecli
454454
az vm extension list -g myResourceGroup --vm-name myVM
@@ -457,13 +457,44 @@ az vm extension list -g myResourceGroup --vm-name myVM
457457
The output looks like the following text:
458458

459459
```output
460-
info: Executing command vm extension get
461-
+ Looking up the VM "scripttst001"
462-
data: Publisher Name Version State
463-
data: -------------------------- ---------------------------------------- ------- ---------
464-
data: Microsoft.Azure.Extensions CustomScript 2.0 Succeeded
465-
data: Microsoft.OSTCExtensions Microsoft.Insights.VMDiagnosticsSettings 2.3 Succeeded
466-
info: vm extension get command OK
460+
[
461+
{
462+
"autoUpgradeMinorVersion": true,
463+
"forceUpdateTag": null,
464+
"id": "/subscriptions/subscriptionid/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname/extensions/customscript",
465+
"resourceGroup": "rgname",
466+
"settings": {
467+
"commandToExecute": "sh script.sh > ",
468+
"fileUris": [
469+
"https://catalogartifact.azureedge.net/publicartifacts/scripts/script.sh",
470+
"https://catalogartifact.azureedge.net/publicartifacts/scripts/script.sh"
471+
]
472+
},
473+
"tags": null,
474+
"type": "Microsoft.Compute/virtualMachines/extensions",
475+
"typeHandlerVersion": "2.0",
476+
"virtualMachineExtensionType": "CustomScript"
477+
},
478+
{
479+
"autoUpgradeMinorVersion": true,
480+
"forceUpdateTag": null,
481+
"id": "/subscriptions/subscriptionid/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname/extensions/OmsAgentForLinux",
482+
"instanceView": null,
483+
"location": "eastus",
484+
"name": "OmsAgentForLinux",
485+
"protectedSettings": null,
486+
"provisioningState": "Succeeded",
487+
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
488+
"resourceGroup": "rgname",
489+
"settings": {
490+
"workspaceId": "workspaceid"
491+
},
492+
"tags": null,
493+
"type": "Microsoft.Compute/virtualMachines/extensions",
494+
"typeHandlerVersion": "1.0",
495+
"virtualMachineExtensionType": "OmsAgentForLinux"
496+
}
497+
]
467498
```
468499

469500
## Next steps

0 commit comments

Comments
 (0)