File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -626,6 +626,5 @@ function Hydrate-DC {
626626 $DC | Get-VMNetworkAdapter | Disconnect-VMNetworkAdapter
627627
628628 $dcHydrationEndTime = Get-Date
629- Return $DC
630629}
631630# endregion
Original file line number Diff line number Diff line change @@ -525,7 +525,8 @@ if (-not $DCFilesExists){
525525# region create DC if it does not exist
526526 if (-not $DCFilesExists ) {
527527 if (-not $LabConfig.NoDehydrateDC ){
528- $DC = Hydrate- DC - DCName $DCName - VhdPath $vhdpath - VmPath $VmPath - SwitchName $HydrationSwitchname - TimeZone $TimeZone - DhcpScope $LabConfig.DHCPscope - AdminPassword $AdminPassword
528+ Hydrate- DC - DCName $DCName - VhdPath $vhdpath - VmPath $VmPath - SwitchName $Switchname - TimeZone $TimeZone - DhcpScope $LabConfig.DHCPscope - AdminPassword $AdminPassword
529+ $DC = Get-VM - Name $DCName
529530 if ($DC -eq $null ){
530531 WriteErrorAndExit " DC was not created successfully Press any key to continue ..."
531532 } else {
Original file line number Diff line number Diff line change @@ -1207,7 +1207,8 @@ If (-not $isAdmin) {
12071207 $VMPath = " $PSScriptRoot \LAB\"
12081208 $HydrationSwitchname = " DC_HydrationSwitch_$ ( [guid ]::NewGuid()) "
12091209
1210- $DC = Hydrate- DC - DCName $DCName - VhdPath $vhdpath - VMPath $VMPath - Switchname $HydrationSwitchname - TimeZone $TimeZone - DHCPScope $LabConfig.DHCPscope - AdminPassword $LabConfig.AdminPassword
1210+ Hydrate- DC - DCName $DCName - VhdPath $vhdpath - VMPath $VMPath - Switchname $HydrationSwitchname - TimeZone $TimeZone - DHCPScope $LabConfig.DHCPscope - AdminPassword $LabConfig.AdminPassword
1211+ $DC = Get-VM - Name $DCName
12111212 if ($DC -eq $null ){
12121213 WriteErrorAndExit " DC was not created successfully Press any key to continue ..."
12131214 } else {
You can’t perform that action at this time.
0 commit comments