Skip to content

Instantly share code, notes, and snippets.

@mithunshanbhag
Last active May 17, 2022 15:45
Show Gist options
  • Save mithunshanbhag/810d5ea909545afefb12c8e13ac07714 to your computer and use it in GitHub Desktop.
Save mithunshanbhag/810d5ea909545afefb12c8e13ac07714 to your computer and use it in GitHub Desktop.
{
"handler": "Microsoft.Compute.VmExtension",
"version": "0.0.1-preview",
"parameters": {
"elements": [
],
"outputs": {
"vmName": "[vmName()]",
"location": "[location()]"
}
}
}
{
"handler": "Microsoft.Compute.VmExtension",
"version": "0.0.1-preview",
"parameters": {
"elements": [
{
"name": "fileUris",
"type": "Microsoft.Common.FileUpload",
"label": "Script files",
"toolTip": "The script files that will be downloaded to the virtual machine.",
"constraints": {
"required": false
},
"options": {
"multiple": true,
"uploadMode": "url"
}
},
{
"name": "commandToExecute",
"type": "Microsoft.Common.TextBox",
"label": "Command",
"defaultValue": "powershell.exe -ExecutionPolicy Unrestricted -Command .\\Script1.ps1",
"toolTip": "The command to execute, for example: powershell.exe -ExecutionPolicy Unrestricted -Command .\\Script.ps1 -Arg1 'foo' -Arg2 'bar'",
"constraints": {
"required": true
}
}
],
"outputs": {
"vmName": "[vmName()]",
"location": "[location()]",
"fileUris": "[elements('fileUris')]",
"commandToExecute": "[elements('commandToExecute')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment