This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WindowsFeature ADDSInstall | |
{ | |
Ensure = "Present" | |
Name = "AD-Domain-Services" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xWaitForADDomain DscForestWait | |
{ | |
DomainName = $DomainName | |
DomainUserCredential= $DomainCreds | |
RetryCount = $RetryCount | |
RetryIntervalSec = $RetryIntervalSec | |
DependsOn = "[WindowsFeature]ADDSInstall" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xADDomainController ReplicaDC | |
{ | |
DomainName = $DomainName | |
DomainAdministratorCredential = $DomainCreds | |
SafemodeAdministratorPassword = $SafeModeAdminCreds | |
DatabasePath = "C:\NTDS" | |
LogPath = "C:\NTDS" | |
SysvolPath = "C:\SYSVOL" | |
DependsOn = "[xWaitForADDomain]DScForestWait" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xPendingReboot Reboot1 | |
{ | |
Name = "RebootServer" | |
DependsOn = "[xADDomainController]ReplicaDC" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration CreateADReplicaDC | |
{ | |
param | |
( | |
[Parameter(Mandatory)][String]$DomainName, | |
[Parameter(Mandatory)] | |
[System.Management.Automation.PSCredential]$Admincreds, | |
[Parameter(Mandatory)] | |
[System.Management.Automation.PSCredential]$SafemodeAdminCreds, | |
[Int]$RetryCount=20, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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')]" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"repoLocation": "https://raw.githubusercontent.com/nivleshc/arm/master/", | |
"CreateReplicaDCPackageURL": "[concat(parameters('repoLocation'), 'CreateADReplicaDC.zip')]", | |
"CreateReplicaDCConfigurationFunction": "CreateADReplicaDC.ps1\\CreateADReplicaDC", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "UpdateDC02NIC", | |
"type": "Microsoft.Resources/deployments", | |
"apiVersion": "2015-01-01", | |
"dependsOn": [], | |
"properties": { | |
"mode": "Incremental", | |
"templateLink": { | |
"uri": "[variables('nicTemplateUri')]", | |
"contentVersion": "1.0.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"nicName": { | |
"type": "string", | |
"metadata": { | |
"Description": "The name of the NIC to Create or Update" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration InstallADFS | |
{ | |
param | |
( | |
[Parameter(Mandatory)] | |
[string]$MachineName, | |
[Parameter(Mandatory)] | |
[string]$DomainName, | |