Try actually defining variable, also add more details to SC-NET-ERR002

This commit is contained in:
camoy 2024-08-16 23:09:35 -07:00
parent 1a6e89745a
commit c814b4ab82

View File

@ -15,16 +15,23 @@ Function fDefaultGatewayCheck() {
Start-Sleep -Seconds 60 Start-Sleep -Seconds 60
Exit 1 Exit 1
} }
else
{
Test-Connection $vSCNextHop Test-Connection $vSCNextHop
Test-Connection $vSCNextHop = $vSCNextHopResult
$vSCNextHopResult = $? $vSCNextHopResult = $?
} }
}
fDefaultGatewayCheck fDefaultGatewayCheck
if ($vSCNextHopResult -contains $false) if ($vSCNextHopResult -contains $false)
{ {
Write-Host "SC-NET-ERR002: CANNOT PING DEFAULT GATEWAY" Write-Host "SC-NET-ERR002: CANNOT PING DEFAULT GATEWAY"
Write-Host "Please check network connection" Write-Host "Please check network connection"
Write-Host "If your default gateway doesn't respond to ping, this might be a security feature, might not be"
Write-Host "Please confirm if you can reach the internet"
Write-Host "If you would like to [F]orcefully continue, connect a keyboard and type F" Write-Host "If you would like to [F]orcefully continue, connect a keyboard and type F"
Write-Host "If you would like to run this test [A]gain, connect a keyboard and type A" Write-Host "If you would like to run this test [A]gain, connect a keyboard and type A"
$vSCNextHopUserResponse = Read-Host "F / A?" $vSCNextHopUserResponse = Read-Host "F / A?"