AZ-104-MicrosoftAzureAdmini.../Allfiles/Labs/08/az104-08-custom_script_extension.json

18 lines
883 B
JSON
Raw Normal View History

2020-02-10 21:12:57 -05:00
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "az104-08-vm1/customScriptExtension",
"apiVersion": "2018-06-01",
"location": "[resourceGroup().location]",
"dependsOn": [
"az104-08-vm1"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.7",
"autoUpgradeMinorVersion": true,
"settings": {
"commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $($env:computername)"
}
}
},