Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Last active September 20, 2016 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nivleshc/e03e4c1c45dfcfa32c2e734d89e7e9c3 to your computer and use it in GitHub Desktop.
Save nivleshc/e03e4c1c45dfcfa32c2e734d89e7e9c3 to your computer and use it in GitHub Desktop.
ARM Template Extension to use DSC to add a replica Domain Controller to an existing Active Directory Domain
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('DC02VMName'),'/CreateReplicaDC')]",
"apiVersion": "2015-05-01-preview",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('DC02VMName'))]",
"Microsoft.Resources/deployments/UpdateDC02NIC",
"[concat('Microsoft.Compute/virtualMachines/',parameters('DC01VMName'),'/extensions/CreateADForest')]"
],
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"autoUpgradeMinorVersion": true,
"settings": {
"ModulesUrl": "[variables('CreateReplicaDCPackageURL')]",
"ConfigurationFunction": "[variables('CreateReplicaDCConfigurationFunction')]",
"Properties": {
"DomainName": "[parameters('domainName')]",
"AdminCreds": {
"UserName": "[parameters('adminUserName')]",
"Password": "PrivateSettingsRef:AdminPassword"
}
"SafemodeAdminCreds": {
"UserName": "[parameters('safemodeAdminUserName')]",
"Password": "PrivateSettingsRef:safemodeAdminPassword"
}
}
},
"protectedSettings": {
"Items": {
"AdminPassword": "[parameters('adminPassword')]",
"safemodeAdminPassword": "[parameters('safemodeAdminPassword')]",
}
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment