Wow I did an array
This commit is contained in:
parent
d14dedcc00
commit
c483cbf687
@ -18,22 +18,39 @@ fDefaultGatewayCheck
|
||||
}
|
||||
else
|
||||
{
|
||||
Function fDNSResolutionCheck() {
|
||||
Write-Host "---Testing DNS Resolution---"
|
||||
Resolve-DnsName -Name "git.sdf.org"
|
||||
$vSCDNSResolutionTestResult1 = $?
|
||||
Resolve-DnsName -Name "customresolutionutility.b-cdn.net"
|
||||
$vSCDNSResolutionTestResult2 = $?
|
||||
Resolve-DnsName -Name "github.com"
|
||||
$vSCDNSResolutionTestResult3 = $?
|
||||
Resolve-DnsName -Name "www.ultimarc.com"
|
||||
$vSCDNSResolutionTestResult4 = $?
|
||||
Resolve-DnsName -Name "www.autohotkey.com"
|
||||
$vSCDNSResolutionTestResult5 = $?
|
||||
Resolve-DnsName -Name "eternallybored.org"
|
||||
$vSCDNSResolutionTestResult6 = $?
|
||||
Resolve-DnsName -Name "7-zip.org"
|
||||
$vSCDNSResolutionTestResult7 = $?
|
||||
fDNSResolutionCheck
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Function fDNSResolutionCheck() {
|
||||
Write-Host "---Testing DNS Resolution---"
|
||||
Resolve-DnsName -Name "git.sdf.org"
|
||||
$vSCDNSResolutionTestResult1 = $?
|
||||
Resolve-DnsName -Name "customresolutionutility.b-cdn.net"
|
||||
$vSCDNSResolutionTestResult2 = $?
|
||||
Resolve-DnsName -Name "github.com"
|
||||
$vSCDNSResolutionTestResult3 = $?
|
||||
Resolve-DnsName -Name "www.ultimarc.com"
|
||||
$vSCDNSResolutionTestResult4 = $?
|
||||
Resolve-DnsName -Name "www.autohotkey.com"
|
||||
$vSCDNSResolutionTestResult5 = $?
|
||||
Resolve-DnsName -Name "eternallybored.org"
|
||||
$vSCDNSResolutionTestResult6 = $?
|
||||
Resolve-DnsName -Name "7-zip.org"
|
||||
$vSCDNSResolutionTestResult7 = $?
|
||||
$vSCDNSResolutionTestResultArray = @($vSCDNSResolutionTestResult1,$vSCDNSResolutionTestResult2,$vSCDNSResolutionTestResult3,$vSCDNSResolutionTestResult4,$vSCDNSResolutionTestResult5,$vSCDNSResolutionTestResult6,$vSCDNSResolutionTestResult7)
|
||||
if ($vSCDNSResolutionTestResultArray -contains $false)
|
||||
{
|
||||
Write-Host "SC-NET-ERR002: CANNOT RESOLVE DNS"
|
||||
Write-Host "Please check your DNS server. Sweetcade cannot continue with a broken DNS server."
|
||||
Write-Host "This script will now exit in 60 seconds."
|
||||
Start-Sleep -Seconds 60
|
||||
Exit 1
|
||||
}
|
||||
else
|
||||
{
|
||||
Exit 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user