Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Scripts/2_CreateParentDisks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ If (-not $isAdmin) {
$LabConfig.DHCPscope="10.0.0.0"
}

if (!$LabConfig.DHCPscopeActive){
$DHCPScopeState = 'Active'
}
elseif ($LabConfig.DHCPscopeActive -eq $false){
$DHCPScopeState = 'Inactive'
}
else {
$DHCPScopeState = 'Active'
}

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