Skip to content

Commit b76567d

Browse files
committed
Updating to allow DHCP Scope Active/Inactive
1 parent a1f8c0a commit b76567d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Scripts/3_Deploy.ps1

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,16 @@ If (-not $isAdmin) {
947947
$LabConfig.DHCPscope="10.0.0.0"
948948
}
949949

950+
if (!$LabConfig.DHCPscopeActive){
951+
$DHCPScopeState = 'Active'
952+
}
953+
elseif ($LabConfig.DHCPscopeActive -eq $false){
954+
$DHCPScopeState = 'Inactive'
955+
}
956+
else {
957+
$DHCPScopeState = 'Active'
958+
}
959+
950960
WriteInfoHighlighted "List of variables used"
951961
WriteInfo "`t Prefix used in lab is $($labconfig.prefix)"
952962

@@ -1287,13 +1297,6 @@ If (-not $isAdmin) {
12871297
$VMPath="$PSScriptRoot\LAB\"
12881298
$HydrationSwitchname="DC_HydrationSwitch_$([guid]::NewGuid())"
12891299

1290-
if ($LabConfig.DHCPscopeActive -eq $false){
1291-
$DHCPScopeState = 'Inctive'
1292-
}
1293-
else {
1294-
$DHCPScopeState = 'Active'
1295-
}
1296-
12971300
Hydrate-DC -DCName $DCName -VhdPath $vhdpath -VMPath $VMPath -Switchname $HydrationSwitchname -TimeZone $TimeZone -DHCPScope $LabConfig.DHCPscope -DHCPScopeState $DHCPScopeState -AdminPassword $LabConfig.AdminPassword
12981301
$DC=Get-VM -Name $DCName
12991302
if ($DC -eq $null){

0 commit comments

Comments
 (0)