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,8 +15,13 @@ Function fDefaultGatewayCheck() {
Start-Sleep -Seconds 60
Exit 1
}
Test-Connection $vSCNextHop
$vSCNextHopResult = $?
else
{
Test-Connection $vSCNextHop
Test-Connection $vSCNextHop = $vSCNextHopResult
$vSCNextHopResult = $?
}
}
fDefaultGatewayCheck
@ -25,6 +30,8 @@ if ($vSCNextHopResult -contains $false)
{
Write-Host "SC-NET-ERR002: CANNOT PING DEFAULT GATEWAY"
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 run this test [A]gain, connect a keyboard and type A"
$vSCNextHopUserResponse = Read-Host "F / A?"