AzureStack-QuickStart-Templ.../101-vm-windows-apply-extens.../azuredeploy.json

34 строки
1.1 KiB
JSON
Исходник Постоянная ссылка Обычный вид История

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"apiProfile": "2018-03-01-hybrid",
"parameters": {
"vmName": {
"type": "string",
"metadata": {
"description": "Name of the existing VM to apply the custom script to"
},
"defaultvalue": "[substring(concat('simplewinvm',resourceGroup().Name),0,12)]"
}
},
"variables": {
},
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('vmName'),'/CustomScriptExtension')]",
"location": "[resourceGroup().location]",
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
2016-07-29 03:31:57 +03:00
"typeHandlerVersion": "1.8",
"autoUpgradeMinorVersion": "true",
"settings": {
"commandToExecute": "powershell -ExecutionPolicy Unrestricted Set-DnsClientServerAddress -InterfaceAlias (Get-NetAdapter).Name -ServerAddresses 192.168.100.2, 8.8.8.8"
}
}
}
2015-12-20 17:32:08 +03:00
],
"outputs": {}
2016-07-29 03:31:57 +03:00
}