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 CreateNewADForest { | |
param | |
#v1.4 | |
( | |
[Parameter(Mandatory)] | |
[String]$DomainName, | |
[Parameter(Mandatory)] | |
[System.Management.Automation.PSCredential]$AdminCreds, |
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
$DomainName - FQDN for the Active Directory Domain to create | |
$AdminCreds - a PSCredentials object that contains username and password | |
that will be assigned to the Domain Administrator account | |
$SafeModeAdminCreds - a PSCredentials object that contains the password that will | |
be assigned to the Safe Mode Administrator account | |
$myFirstUserCreds - a PSCredentials object that contains the username and | |
password for the first domain user account to create | |
$RetryCount - defines how many retries should be performed while waiting | |
for the domain to be provisioned | |
$RetryIntervalSec - defines the seconds between each retry to check if the |
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
"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": { |
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
[System.Management.Automation.PSCredential]$DomainCreds = New-Object System.Management.Automation.PSCredential ("${DomainName}\$($Admincreds.UserName)", $Admincreds.Password |
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
xADDomain FirstDC | |
{ | |
DomainName = $DomainName | |
DomainAdministratorCredential = $DomainCreds | |
SafemodeAdministratorPassword = $SafeModeAdminCreds | |
DatabasePath = "C:\NTDS" | |
LogPath = "C:\NTDS" | |
SysvolPath = "C:\SYSVOL" | |
DependsOn = "[WindowsFeature]ADDSInstall","[xDnsServerAddress]DnsServerAddress" | |
} |
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/", | |
"CreateNewADForestPackageURL": "[concat(variables('repoLocation'), 'CreateNewADForest.zip')]", | |
"CreateNewADForestConfigurationFunction": "CreateNewADForest.ps1\\CreateNewADForest", |
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, |
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
Import-DscResource -ModuleName xActiveDirectory, xPendingReboot |
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
LocalConfigurationManager | |
{ | |
ActionAfterReboot = 'ContinueConfiguration' | |
ConfigurationMode = 'ApplyOnly' | |
RebootNodeIfNeeded = $true | |
} |
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 RSAT | |
{ | |
Ensure = "Present" | |
Name = "RSAT" | |
} |
OlderNewer