Skip to content

Instantly share code, notes, and snippets.

@nivleshc
Last active September 8, 2016 07:32
Show Gist options
  • Save nivleshc/328cb68dc2d2fba3c84326d78546d1ba to your computer and use it in GitHub Desktop.
Save nivleshc/328cb68dc2d2fba3c84326d78546d1ba to your computer and use it in GitHub Desktop.
Azure Resource Manager Template to create a new Active Directory Forest
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('DC01Name'),'/CreateNewADForest')]",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('DC01Name'))]"
],
"tags": {
"displayName": "CreateNewADForest"
},
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.19",
"autoUpgradeMinorVersion": true,
"settings": {
"Modulesurl": "[variables('CreateNewADForestPackageURL')]",
"ConfigurationFunction":"[variables('CreateNewADForestConfigurationFunction')]",
"Properties": {
"DomainName": "[parameters('domainName')]",
"AdminCreds": {
"UserName": "[parameters('adminUserName')]",
"Password": "PrivateSettingsRef:AdminPassword"
},
"SafeModeAdminCreds": {
"UserName": "[parameters('safemodeAdminUserName')]",
"Password": "PrivateSettingsRef:SafeModeAdminPassword"
},
"myFirstUserCreds": {
"UserName": "[parameters('myFirstUserName')]",
"Password": "PrivateSettingsRef:MyFirstUserPassword"
}
}
},
"protectedSettings": {
"Items": {
"AdminPassword": "[parameters('adminPassword')]",
"SafeModeAdminPassword": "[parameters('safemodeadminPassword')]",
"MyFirstUserPassword": "[parameters('myFirstUserPassword')]"
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment