4 changed files
AzureARMTemplate | ||
azuredeploy.json + | ||
azuredeploy.parameters.json + | ||
AzureDSCCompliation | ||
build.ps1 + | ||
AzureDSCConfiguration | ||
demoenvironment.ps1 + | ||
Displayed content is truncated due to maximum viewable content limit.
Add comment 1 Plus {
Add comment 2 Plus "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
Add comment 3 Plus "contentVersion": "1.0.0.0",
Add comment 4 Plus "parameters": {
Add comment 5 Plus "adminPassword": {
Add comment 6 Plus "type": "securestring",
Add comment 7 Plus "metadata": {
Add comment 8 Plus "Description": "Password for the Virtual Machine."
Add comment 9 Plus }
Add comment 10 Plus }
Add comment 11 Plus },
Add comment 12 Plus "variables": {
Add comment 13 Plus "location": "SouthEast Asia",
Add comment 14 Plus
Add comment 15 Plus "StorageAccountName": "aahwdemostorage",
Add comment 16 Plus "storageAccountType": "Standard_LRS",
Add comment 17 Plus "vmStorageAccountContainerName": "vhds",
Add comment 18 Plus
Add comment 19 Plus "virtualNetworkName": "aahwdemo-vnet",
Add comment 20 Plus "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
Add comment 21 Plus "addressPrefix": "10.0.0.0/16",
Add comment 22 Plus "dcsubnetName": "aahwdemo-dcs",
Add comment 23 Plus "dcsubnetRef": "[concat(variables('vnetID'),'/subnets/',variables('dcsubnetName'))]",
Add comment 24 Plus "dcsubnetPrefix": "10.0.0.0/24",
Add comment 25 Plus "srvsubnetName": "aahwdemo-srvs",
Add comment 26 Plus "srvsubnetRef": "[concat(variables('vnetID'),'/subnets/',variables('srvsubnetName'))]",
Add comment 27 Plus "srvsubnetPrefix": "10.0.1.0/24",
Add comment 28 Plus
Add comment 29 Plus "imagePublisher": "MicrosoftWindowsServer",
Add comment 30 Plus "imageOffer": "WindowsServer",
Add comment 31 Plus "windowsOSVersion": "2012-R2-Datacenter",
Add comment 32 Plus "vmSize": "Standard_A1",
Add comment 33 Plus "osType": "Windows",
Add comment 34 Plus "adminUsername": "localadmin",
Add comment 35 Plus "adDataDiskSize": 10,
Add comment 36 Plus
Add comment 37 Plus "nsgName": "aahwdemo-nsg",
Add comment 38 Plus
Add comment 39 Plus "adAvailabilitySetName": "aahwdemo-as",
Add comment 40 Plus
Add comment 41 Plus "publicIPAddressType": "Dynamic",
Add comment 42 Plus "publicIPAddressName": "aahwdemo-pub",
Add comment 43 Plus "dnsNameForPublicIP": "aahwdemo-pub",
Add comment 44 Plus
Add comment 45 Plus "loadbalancerName": "aahwdemo-lb",
Add comment 46 Plus "loadbalancerFEName" : "aahwdemo-lb-fe",
Add comment 47 Plus "loadbalancerBEName" : "aahwdemo-lb-be",
Add comment 48 Plus "adlbID": "[resourceId('Microsoft.Network/loadBalancers',variables('loadbalancerName'))]",
Add comment 49 Plus "adlbFEConfigID": "[concat(variables('adlbID'),'/frontendIPConfigurations/',variables('loadbalancerFEName'))]",
Add comment 50 Plus "adBEAddressPoolID": "[concat(variables('adlbID'),'/backendAddressPools/',variables('loadbalancerBEName'))]",
Add comment 51 Plus
Add comment 52 Plus "modulesUrl": "https://github.com/Azure/azure-quickstart-templates/raw/master/dsc-extension-azure-automation-pullserver/UpdateLCMforAAPull.zip",
Add comment 53 Plus "configurationFunction": "UpdateLCMforAAPull.ps1\\ConfigureLCMforAAPull",
Add comment 54 Plus "registrationUrl": "https://sea-agentservice-prod-1.azure-automation.net/accounts/c4a54364-074f-4339-b2d6-64a8b435e895",
Add comment 55 Plus "registrationKey": "PNIkeuDQCt8zpSwsqNcLEu+6H5n8qhU9uL4kwYxfRw55RChRH9JcQsPQQNrZVL7qzk/nbDVgnjLZuWXBGM+n2g==",
Add comment 56 Plus "configurationMode": "ApplyAndMonitor",
Add comment 57 Plus "configurationModeFrequencyMins": 15,
Add comment 58 Plus "refreshFrequencyMins": 30,
Add comment 59 Plus "rebootNodeIfNeeded": true,
Add comment 60 Plus "actionAfterReboot": "ContinueConfiguration",
Add comment 61 Plus "allowModuleOverwrite": true,
Add comment 62 Plus "timestamp": "04/06/2016 6:14:30",
Add comment 63 Plus
Add comment 64 Plus "workspaceId": "baa19a10-815f-4721-98f6-3258bac16e10",
Add comment 65 Plus "workspaceKey": "qNAaWCaHs3IE1hfcdmNtIJbENr45+aSnnDkvRn1asir9lAe2KyFLYzVUvJ+11mK5pHAnIJts15VPWHhji74S8A==",
Add comment 66 Plus
Add comment 67 Plus "DC01vmName": "dc01",
Add comment 68 Plus "DC01osDiskName": "dc01-osdisk",
Add comment 69 Plus "DC01dataDiskName": "dc01-data",
Add comment 70 Plus "DC01nicName": "dc01-nic",
Add comment 71 Plus "DC01rdpPort": 13389,
Add comment 72 Plus "DC01privateIPAddress": "10.0.0.4",
Add comment 73 Plus "DC01nodeConfigurationName": "demoenvironment.dc01",
Add comment 74 Plus "DC01rdpNatRuleName": "dc01-rdp-nat",
Add comment 75 Plus "DC01rdpNatRuleID": "[concat(variables('adlbID'),'/inboundNatRules/',variables('DC01rdpNatRuleName'))]",
Add comment 76 Plus
Add comment 77 Plus "DC02vmName": "dc02",
Add comment 78 Plus "DC02osDiskName": "dc02-osdisk",
Add comment 79 Plus "DC02dataDiskName": "dc02-data",
Add comment 80 Plus "DC02nicName": "dc02-nic",
Add comment 81 Plus "DC02rdpPort": 23389,
Add comment 82 Plus "DC02privateIPAddress": "10.0.0.5",
Add comment 83 Plus "DC02nodeConfigurationName": "demoenvironment.dc02",
Add comment 84 Plus "DC02rdpNatRuleName": "dc02-rdp-nat",
Add comment 85 Plus "DC02rdpNatRuleID": "[concat(variables('adlbID'),'/inboundNatRules/',variables('DC02rdpNatRuleName'))]"
Add comment 86 Plus
Add comment 87 Plus },
Add comment 88 Plus "resources": [
Add comment 89 Plus {
Add comment 90 Plus "type": "Microsoft.Storage/storageAccounts",
Add comment 91 Plus "name": "[variables('StorageAccountName')]",
Add comment 92 Plus "apiVersion": "2015-06-15",
Add comment 93 Plus "location": "[variables('location')]",
Add comment 94 Plus "properties": {
Add comment 95 Plus "accountType": "[variables('storageAccountType')]"
Add comment 96 Plus }
Add comment 97 Plus },
Add comment 98 Plus {
Add comment 99 Plus "apiVersion": "2015-06-15",
Add comment 100 Plus "type": "Microsoft.Network/publicIPAddresses",
Add comment 101 Plus "name": "[variables('publicIPAddressName')]",
Add comment 102 Plus "location": "[variables('location')]",
Add comment 103 Plus "properties": {
Add comment 104 Plus "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
Add comment 105 Plus "dnsSettings": {
Add comment 106 Plus "domainNameLabel": "[variables('dnsNameForPublicIP')]"
Add comment 107 Plus }
Add comment 108 Plus }
Add comment 109 Plus },
Add comment 110 Plus {
Add comment 111 Plus "type": "Microsoft.Compute/availabilitySets",
Add comment 112 Plus "name": "[variables('adAvailabilitySetName')]",
Add comment 113 Plus "apiVersion": "2015-06-15",
Add comment 114 Plus "location": "[variables('location')]"
Add comment 115 Plus },
Add comment 116 Plus {
Add comment 117 Plus "apiVersion": "2015-06-15",
Add comment 118 Plus "type": "Microsoft.Network/virtualNetworks",
Add comment 119 Plus "name": "[variables('virtualNetworkName')]",
Add comment 120 Plus "location": "[variables('location')]",
Add comment 121 Plus "properties": {
Add comment 122 Plus "addressSpace": {
Add comment 123 Plus "addressPrefixes": [
Add comment 124 Plus "[variables('addressPrefix')]"
Add comment 125 Plus ]
Add comment 126 Plus },
Add comment 127 Plus "subnets": [
Add comment 128 Plus {
Add comment 129 Plus "name": "[variables('dcsubnetName')]",
Add comment 130 Plus "properties": {
Add comment 131 Plus "addressPrefix": "[variables('dcsubnetPrefix')]"
Add comment 132 Plus }
Add comment 133 Plus },
Add comment 134 Plus {
Add comment 135 Plus "name": "[variables('srvsubnetName')]",
Add comment 136 Plus "properties": {
Add comment 137 Plus "addressPrefix": "[variables('srvsubnetPrefix')]"
Add comment 138 Plus }
Add comment 139 Plus }
Add comment 140 Plus ]
Add comment 141 Plus }
Add comment 142 Plus },
Add comment 143 Plus {
Add comment 144 Plus "apiVersion": "2015-05-01-preview",
Add comment 145 Plus "name": "[variables('loadbalancerName')]",
Add comment 146 Plus "type": "Microsoft.Network/loadBalancers",
Add comment 147 Plus "location": "[variables('location')]",
Add comment 148 Plus "dependsOn": [
Add comment 149 Plus "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
Add comment 150 Plus ],
Add comment 151 Plus "properties": {
Add comment 152 Plus "frontendIPConfigurations": [
Add comment 153 Plus {
Add comment 154 Plus "name": "[variables('loadbalancerFEName')]",
Add comment 155 Plus "properties": {
Add comment 156 Plus "publicIPAddress": {
Add comment 157 Plus "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
Add comment 158 Plus }
Add comment 159 Plus }
Add comment 160 Plus }
Add comment 161 Plus ],
Add comment 162 Plus "backendAddressPools": [
Add comment 163 Plus {
Add comment 164 Plus "name": "[variables('loadbalancerBEName')]"
Add comment 165 Plus }
Add comment 166 Plus ],
Add comment 167 Plus "inboundNatRules": [
Add comment 168 Plus {
Add comment 169 Plus "name": "[variables('DC01rdpNatRuleName')]",
Add comment 170 Plus "properties": {
Add comment 171 Plus "frontendIPConfiguration": {
Add comment 172 Plus "id": "[variables('adlbFEConfigID')]"
Add comment 173 Plus },
Add comment 174 Plus "protocol": "tcp",
Add comment 175 Plus "frontendPort": "[variables('DC01rdpPort')]",
Add comment 176 Plus "backendPort": 3389,
Add comment 177 Plus "enableFloatingIP": false
Add comment 178 Plus }
Add comment 179 Plus },
Add comment 180 Plus {
Add comment 181 Plus "name": "[variables('DC02rdpNatRuleName')]",
Add comment 182 Plus "properties": {
Add comment 183 Plus "frontendIPConfiguration": {
Add comment 184 Plus "id": "[variables('adlbFEConfigID')]"
Add comment 185 Plus },
Add comment 186 Plus "protocol": "tcp",
Add comment 187 Plus "frontendPort": "[variables('DC02rdpPort')]",
Add comment 188 Plus "backendPort": 3389,
Add comment 189 Plus "enableFloatingIP": false
Add comment 190 Plus }
Add comment 191 Plus }
Add comment 192 Plus ]
Add comment 193 Plus }
Add comment 194 Plus },
Add comment 195 Plus {
Add comment 196 Plus "apiVersion": "2015-06-15",
Add comment 197 Plus "type": "Microsoft.Network/networkSecurityGroups",
Add comment 198 Plus "name": "[variables('nsgName')]",
Add comment 199 Plus "location": "[variables('location')]",
Add comment 200 Plus "properties": {
Add comment 201 Plus "securityRules": [
Add comment 202 Plus {
Add comment 203 Plus "name": "RDP",
Add comment 204 Plus "properties": {
Add comment 205 Plus "description": "Allows RDP traffic",
Add comment 206 Plus "protocol": "Tcp",
Add comment 207 Plus "sourcePortRange": "*",
Add comment 208 Plus "destinationPortRange": "3389",
Add comment 209 Plus "sourceAddressPrefix": "*",
Add comment 210 Plus "destinationAddressPrefix": "*",
Add comment 211 Plus "access": "Allow",
Add comment 212 Plus "priority": 500,
Add comment 213 Plus "direction": "Inbound"
Add comment 214 Plus }
Add comment 215 Plus }
Add comment 216 Plus ]
Add comment 217 Plus }
Add comment 218 Plus },
Add comment 219 Plus {
Add comment 220 Plus "apiVersion": "2015-06-15",
Add comment 221 Plus "type": "Microsoft.Network/networkInterfaces",
Add comment 222 Plus "name": "[variables('DC01nicName')]",
Add comment 223 Plus "location": "[variables('location')]",
Add comment 224 Plus "dependsOn": [
Add comment 225 Plus "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
Add comment 226 Plus "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]",
Add comment 227 Plus "[concat('Microsoft.Network/loadBalancers/',variables('loadbalancerName'))]"
Add comment 228 Plus ],
Add comment 229 Plus "properties": {
Add comment 230 Plus "ipConfigurations": [
Add comment 231 Plus {
Add comment 232 Plus "name": "ipconfig1",
Add comment 233 Plus "properties": {
Add comment 234 Plus "privateIPAllocationMethod": "Static",
Add comment 235 Plus "privateIPAddress": "[variables('DC01privateIPAddress')]",
Add comment 236 Plus "subnet": {
Add comment 237 Plus "id": "[variables('dcsubnetRef')]"
Add comment 238 Plus },
Add comment 239 Plus "loadBalancerBackendAddressPools": [
Add comment 240 Plus {
Add comment 241 Plus "id": "[variables('adBEAddressPoolID')]"
Add comment 242 Plus }
Add comment 243 Plus ],
Add comment 244 Plus "loadBalancerInboundNatRules": [
Add comment 245 Plus {
Add comment 246 Plus "id": "[variables('DC01rdpNatRuleID')]"
Add comment 247 Plus }
Add comment 248 Plus ]
Add comment 249 Plus }
Add comment 250 Plus }
Add comment 251 Plus ],
Add comment 252 Plus "networkSecurityGroup": {
Add comment 253 Plus "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]"
Add comment 254 Plus }
Add comment 255 Plus }
Add comment 256 Plus },
Add comment 257 Plus {
Add comment 258 Plus "apiVersion": "2015-06-15",
Add comment 259 Plus "type": "Microsoft.Network/networkInterfaces",
Add comment 260 Plus "name": "[variables('DC02nicName')]",
Add comment 261 Plus "location": "[variables('location')]",
Add comment 262 Plus "dependsOn": [
Add comment 263 Plus "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
Add comment 264 Plus "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]",
Add comment 265 Plus "[concat('Microsoft.Network/loadBalancers/',variables('loadbalancerName'))]"
Add comment 266 Plus ],
Add comment 267 Plus "properties": {
Add comment 268 Plus "ipConfigurations": [
Add comment 269 Plus {
Add comment 270 Plus "name": "ipconfig1",
Add comment 271 Plus "properties": {
Add comment 272 Plus "privateIPAllocationMethod": "Static",
Add comment 273 Plus "privateIPAddress": "[variables('DC02privateIPAddress')]",
Add comment 274 Plus "subnet": {
Add comment 275 Plus "id": "[variables('dcsubnetRef')]"
Add comment 276 Plus },
Add comment 277 Plus "loadBalancerBackendAddressPools": [
Add comment 278 Plus {
Add comment 279 Plus "id": "[variables('adBEAddressPoolID')]"
Add comment 280 Plus }
Add comment 281 Plus ],
Add comment 282 Plus "loadBalancerInboundNatRules": [
Add comment 283 Plus {
Add comment 284 Plus "id": "[variables('DC02rdpNatRuleID')]"
Add comment 285 Plus }
Add comment 286 Plus ]
Add comment 287 Plus }
Add comment 288 Plus }
Add comment 289 Plus ],
Add comment 290 Plus "networkSecurityGroup": {
Add comment 291 Plus "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]"
Add comment 292 Plus }
Add comment 293 Plus }
Add comment 294 Plus },
Add comment 295 Plus {
Add comment 296 Plus "apiVersion": "2015-06-15",
Add comment 297 Plus "type": "Microsoft.Compute/virtualMachines",
Add comment 298 Plus "name": "[variables('DC01vmName')]",
Add comment 299 Plus "location": "[variables('location')]",
Add comment 300 Plus "dependsOn": [
Add comment 301 Plus "[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]",
Add comment 302 Plus "[concat('Microsoft.Network/networkInterfaces/', variables('DC01nicName'))]",
Add comment 303 Plus "[concat('Microsoft.Network/loadBalancers/',variables('loadbalancerName'))]",
Add comment 304 Plus "[concat('Microsoft.Compute/availabilitySets/',variables('adAvailabilitySetName'))]"
Add comment 305 Plus ],
Add comment 306 Plus "properties": {
Add comment 307 Plus "hardwareProfile": {
Add comment 308 Plus "vmSize": "[variables('vmSize')]"
Add comment 309 Plus },
Add comment 310 Plus "availabilitySet": {
Add comment 311 Plus "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('adAvailabilitySetName'))]"
Add comment 312 Plus },
Add comment 313 Plus "osProfile": {
Add comment 314 Plus "computerName": "[variables('DC01vmName')]",
Add comment 315 Plus "adminUsername": "[variables('adminUsername')]",
Add comment 316 Plus "adminPassword": "[parameters('adminPassword')]"
Add comment 317 Plus },
Add comment 318 Plus "storageProfile": {
Add comment 319 Plus "imageReference": {
Add comment 320 Plus "publisher": "[variables('imagePublisher')]",
Add comment 321 Plus "offer": "[variables('imageOffer')]",
Add comment 322 Plus "sku" : "[variables('windowsOSVersion')]",
Add comment 323 Plus "version":"latest"
Add comment 324 Plus },
Add comment 325 Plus "osDisk" : {
Add comment 326 Plus "name": "osdisk",
Add comment 327 Plus "createOption": "FromImage",
Add comment 328 Plus "vhd": {
Add comment 329 Plus "uri": "[concat('http://',variables('StorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('DC01osDiskName'),'.vhd')]"
Add comment 330 Plus },
Add comment 331 Plus "caching": "ReadWrite"
Add comment 332 Plus },
Add comment 333 Plus "dataDisks": [
Add comment 334 Plus {
Add comment 335 Plus "vhd": {
Add comment 336 Plus "uri": "[concat('http://', variables('StorageAccountName'),'.blob.core.windows.net/vhds/', variables('DC01dataDiskName'),'-1.vhd')]"
Add comment 337 Plus },
Add comment 338 Plus "name": "[concat(variables('DC01vmName'),'-data-disk1')]",
Add comment 339 Plus "caching": "None",
Add comment 340 Plus "createOption": "Empty",
Add comment 341 Plus "diskSizeGB": "[variables('adDataDiskSize')]",
Add comment 342 Plus "lun": 0
Add comment 343 Plus }
Add comment 344 Plus ]
Add comment 345 Plus },
Add comment 346 Plus "networkProfile": {
Add comment 347 Plus "networkInterfaces": [
Add comment 348 Plus {
Add comment 349 Plus "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('DC01nicName'))]"
Add comment 350 Plus }
Add comment 351 Plus ]
Add comment 352 Plus }
Add comment 353 Plus }
Add comment 354 Plus },
Add comment 355 Plus {
Add comment 356 Plus "apiVersion": "2015-06-15",
Add comment 357 Plus "type": "Microsoft.Compute/virtualMachines",
Add comment 358 Plus "name": "[variables('DC02vmName')]",
Add comment 359 Plus "location": "[variables('location')]",
Add comment 360 Plus "dependsOn": [
Add comment 361 Plus "[concat('Microsoft.Storage/storageAccounts/', variables('StorageAccountName'))]",
Add comment 362 Plus "[concat('Microsoft.Network/networkInterfaces/', variables('DC02nicName'))]",
Add comment 363 Plus "[concat('Microsoft.Network/loadBalancers/',variables('loadbalancerName'))]",
Add comment 364 Plus "[concat('Microsoft.Compute/availabilitySets/',variables('adAvailabilitySetName'))]",
Add comment 365 Plus "[concat('Microsoft.Compute/virtualMachines/', variables('DC01vmName'))]"
Add comment 366 Plus ],
Add comment 367 Plus "properties": {
Add comment 368 Plus "hardwareProfile": {
Add comment 369 Plus "vmSize": "[variables('vmSize')]"
Add comment 370 Plus },
Add comment 371 Plus "availabilitySet": {
Add comment 372 Plus "id": "[resourceId('Microsoft.Compute/availabilitySets', variables('adAvailabilitySetName'))]"
Add comment 373 Plus },
Add comment 374 Plus "osProfile": {
Add comment 375 Plus "computerName": "[variables('DC02vmName')]",
Add comment 376 Plus "adminUsername": "[variables('adminUsername')]",
Add comment 377 Plus "adminPassword": "[parameters('adminPassword')]"
Add comment 378 Plus },
Add comment 379 Plus "storageProfile": {
Add comment 380 Plus "imageReference": {
Add comment 381 Plus "publisher": "[variables('imagePublisher')]",
Add comment 382 Plus "offer": "[variables('imageOffer')]",
Add comment 383 Plus "sku" : "[variables('windowsOSVersion')]",
Add comment 384 Plus "version":"latest"
Add comment 385 Plus },
Add comment 386 Plus "osDisk" : {
Add comment 387 Plus "name": "osdisk",
Add comment 388 Plus "createOption": "FromImage",
Add comment 389 Plus "vhd": {
Add comment 390 Plus "uri": "[concat('http://',variables('StorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('DC02osDiskName'),'.vhd')]"
Add comment 391 Plus },
Add comment 392 Plus "caching": "ReadWrite"
Add comment 393 Plus },
Add comment 394 Plus "dataDisks": [
Add comment 395 Plus {
Add comment 396 Plus "vhd": {
Add comment 397 Plus "uri": "[concat('http://', variables('StorageAccountName'),'.blob.core.windows.net/vhds/', variables('DC02dataDiskName'),'-1.vhd')]"
Add comment 398 Plus },
Add comment 399 Plus "name": "[concat(variables('DC01vmName'),'-data-disk1')]",
Add comment 400 Plus "caching": "None",
Add comment 401 Plus "createOption": "Empty",
Add comment 402 Plus "diskSizeGB": "[variables('adDataDiskSize')]",
Add comment 403 Plus "lun": 0
Add comment 404 Plus }
Add comment 405 Plus ]
Add comment 406 Plus },
Add comment 407 Plus "networkProfile": {
Add comment 408 Plus "networkInterfaces": [
Add comment 409 Plus {
Add comment 410 Plus "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('DC02nicName'))]"
Add comment 411 Plus }
Add comment 412 Plus ]
Add comment 413 Plus }
Add comment 414 Plus }
Add comment 415 Plus },
Add comment 416 Plus {
Add comment 417 Plus "apiVersion": "2015-06-15",
Add comment 418 Plus "type": "Microsoft.Compute/virtualMachines/extensions",
Add comment 419 Plus "name": "[concat(variables('DC01vmName'),'/Microsoft.Powershell.DSC')]",
Add comment 420 Plus "location": "[resourceGroup().location]",
Add comment 421 Plus "dependsOn": [
Add comment 422 Plus "[concat('Microsoft.Compute/virtualMachines/', variables('DC01vmName'))]"
Add comment 423 Plus ],
Add comment 424 Plus "properties": {
Add comment 425 Plus "publisher": "Microsoft.Powershell",
Add comment 426 Plus "type": "DSC",
Add comment 427 Plus "typeHandlerVersion": "2.15",
Add comment 428 Plus "autoUpgradeMinorVersion": true,
Add comment 429 Plus "protectedSettings": {
Add comment 430 Plus "Items": {
Add comment 431 Plus "registrationKeyPrivate": "[variables('registrationKey')]"
Add comment 432 Plus }
Add comment 433 Plus },
Add comment 434 Plus "settings": {
Add comment 435 Plus "ModulesUrl": "[variables('modulesUrl')]",
Add comment 436 Plus "SasToken": "",
Add comment 437 Plus "ConfigurationFunction": "[variables('configurationFunction')]",
Add comment 438 Plus "Properties": [
Add comment 439 Plus {
Add comment 440 Plus "Name": "RegistrationKey",
Add comment 441 Plus "Value": {
Add comment 442 Plus "UserName": "PLACEHOLDER_DONOTUSE",
Add comment 443 Plus "Password": "PrivateSettingsRef:registrationKeyPrivate"
Add comment 444 Plus },
Add comment 445 Plus "TypeName": "System.Management.Automation.PSCredential"
Add comment 446 Plus },
Add comment 447 Plus {
Add comment 448 Plus "Name": "RegistrationUrl",
Add comment 449 Plus "Value": "[variables('registrationUrl')]",
Add comment 450 Plus "TypeName": "System.String"
Add comment 451 Plus },
Add comment 452 Plus {
Add comment 453 Plus "Name": "NodeConfigurationName",
Add comment 454 Plus "Value": "[variables('DC01nodeConfigurationName')]",
Add comment 455 Plus "TypeName": "System.String"
Add comment 456 Plus },
Add comment 457 Plus {
Add comment 458 Plus "Name": "ConfigurationMode",
Add comment 459 Plus "Value": "[variables('configurationMode')]",
Add comment 460 Plus "TypeName": "System.String"
Add comment 461 Plus },
Add comment 462 Plus {
Add comment 463 Plus "Name": "ConfigurationModeFrequencyMins",
Add comment 464 Plus "Value": "[variables('configurationModeFrequencyMins')]",
Add comment 465 Plus "TypeName": "System.Int32"
Add comment 466 Plus },
Add comment 467 Plus {
Add comment 468 Plus "Name": "RefreshFrequencyMins",
Add comment 469 Plus "Value": "[variables('refreshFrequencyMins')]",
Add comment 470 Plus "TypeName": "System.Int32"
Add comment 471 Plus },
Add comment 472 Plus {
Add comment 473 Plus "Name": "RebootNodeIfNeeded",
Add comment 474 Plus "Value": "[variables('rebootNodeIfNeeded')]",
Add comment 475 Plus "TypeName": "System.Boolean"
Add comment 476 Plus },
Add comment 477 Plus {
Add comment 478 Plus "Name": "ActionAfterReboot",
Add comment 479 Plus "Value": "[variables('actionAfterReboot')]",
Add comment 480 Plus "TypeName": "System.String"
Add comment 481 Plus },
Add comment 482 Plus {
Add comment 483 Plus "Name": "AllowModuleOverwrite",
Add comment 484 Plus "Value": "[variables('allowModuleOverwrite')]",
Add comment 485 Plus "TypeName": "System.Boolean"
Add comment 486 Plus },
Add comment 487 Plus {
Add comment 488 Plus "Name": "Timestamp",
Add comment 489 Plus "Value": "[variables('timestamp')]",
Add comment 490 Plus "TypeName": "System.String"
Add comment 491 Plus }
Add comment 492 Plus ]
Add comment 493 Plus }
Add comment 494 Plus }
Add comment 495 Plus },
Add comment 496 Plus {
Add comment 497 Plus "apiVersion": "2015-06-15",
Add comment 498 Plus "type": "Microsoft.Compute/virtualMachines/extensions",
Add comment 499 Plus "name": "[concat(variables('DC02vmName'),'/Microsoft.Powershell.DSC')]",
azuredeploy.parameters.json
/AzureARMTemplate/azuredeploy.parameters.json+9/AzureARMTemplate/azuredeploy.parameters.json
Add comment 1 Plus {
Add comment 2 Plus "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
Add comment 3 Plus "contentVersion": "1.0.0.0",
Add comment 4 Plus "parameters": {
Add comment 5 Plus "adminPassword": {
Add comment 6 Plus "value": "uWFvu9Z*xC!(2@4tpVae5VNFkp3mtn"
Add comment 7 Plus }
Add comment 8 Plus }
Add comment 9 Plus }
Add comment 1 Plus $ResourceGroupName = 'poshsecurity-aa'
Add comment 2 Plus $AutomationAccountName = 'poshsecurity-aa'
Add comment 3 Plus $ConfigurationName = 'demoenvironment'
Add comment 4 Plus $SourcePath = 'D:\Desktop\demoenvironment.ps1'
Add comment 5 Plus
Add comment 6 Plus #--------------
Add comment 7 Plus
Add comment 8 Plus $ConfigData = @{
Add comment 9 Plus AllNodes = @(
Add comment 10 Plus @{
Add comment 11 Plus Nodename = 'dc01'
Add comment 12 Plus Role = 'Primary DC'
Add comment 13 Plus PSDscAllowPlainTextPassword = $true
Add comment 14 Plus PSDscAllowDomainUser = $true
Add comment 15 Plus }
Add comment 16 Plus @{
Add comment 17 Plus Nodename = 'dc02'
Add comment 18 Plus Role = 'Secondary DC'
Add comment 19 Plus PSDscAllowPlainTextPassword = $true
Add comment 20 Plus PSDscAllowDomainUser = $true
Add comment 21 Plus }
Add comment 22 Plus )
Add comment 23 Plus }
Add comment 24 Plus
Add comment 25 Plus $null = Import-AzureRmAutomationDscConfiguration -SourcePath $SourcePath -ResourceGroupName $ResourceGroupName -AutomationAccountName $AutomationAccountName -Published -Force
Add comment 26 Plus $null = Start-AzureRmAutomationDscCompilationJob -ConfigurationName $ConfigurationName -ConfigurationData $ConfigData -ResourceGroupName $ResourceGroupName -AutomationAccountName $AutomationAccountName
Add comment 27 Plus Do {
Add comment 28 Plus sleep 10
Add comment 29 Plus Write-host -Object '.' -NoNewline
Add comment 30 Plus $LastJob = Get-AzureRmAutomationDscCompilationJob -ResourceGroupName $ResourceGroupName -AutomationAccountName $AutomationAccountName | Select-Object -Last 1
Add comment 31 Plus } until (($LastJob.Status -eq 'Suspended') -or ($LastJob.Status -eq 'Completed'))
Add comment 32 Plus $LastJob.status
Add comment 33 Plus
demoenvironment.ps1
/AzureDSCConfiguration/demoenvironment.ps1/AzureDSCConfiguration/demoenvironment.ps1