Skip to content

Commit 2a93484

Browse files
authored
Merge pull request #622 from microsoft/dev
Dev
2 parents b8c22f1 + c5923a5 commit 2a93484

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Scripts/2_CreateParentDisks.ps1

+10-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ If (-not $isAdmin) {
6464
$LabConfig.DHCPscope="10.0.0.0"
6565
}
6666

67+
if (!$LabConfig.DHCPscopeActive){
68+
$DHCPScopeState = 'Active'
69+
}
70+
elseif ($LabConfig.DHCPscopeActive -eq $false){
71+
$DHCPScopeState = 'Inactive'
72+
}
73+
else {
74+
$DHCPScopeState = 'Active'
75+
}
6776

6877
#create some built-in variables
6978
$DN=$null
@@ -525,7 +534,7 @@ if (-not $DCFilesExists){
525534
#region create DC if it does not exist
526535
if (-not $DCFilesExists) {
527536
if (-not $LabConfig.NoDehydrateDC){
528-
Hydrate-DC -DCName $DCName -VhdPath $vhdpath -VmPath $VmPath -SwitchName $Switchname -TimeZone $TimeZone -DhcpScope $LabConfig.DHCPscope -AdminPassword $AdminPassword
537+
Hydrate-DC -DCName $DCName -VhdPath $vhdpath -VmPath $VmPath -SwitchName $Switchname -TimeZone $TimeZone -DhcpScope $LabConfig.DHCPscope -DHCPScopeState $DHCPScopeState -AdminPassword $AdminPassword
529538
$DC=Get-VM -Name $DCName
530539
if ($DC -eq $null){
531540
WriteErrorAndExit "DC was not created successfully Press any key to continue ..."

0 commit comments

Comments
 (0)