From 78232dacf7e7e84ed85fef1e09308109b1cede8f Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 10 Oct 2022 08:37:10 +0200 Subject: [PATCH] Update check-ping.ps1 and check-vpn.ps1 --- Scripts/check-ping.ps1 | 2 +- Scripts/check-vpn.ps1 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/check-ping.ps1 b/Scripts/check-ping.ps1 index 8c5546d5..e0373e80 100755 --- a/Scripts/check-ping.ps1 +++ b/Scripts/check-ping.ps1 @@ -36,7 +36,7 @@ try { $Avg += $Latency } $Avg = $Avg / $Pings.count - "✅ Ping is $($Avg)ms average ($($Min)ms min, $($Max)ms max)." + "✅ Ping is $($Avg)ms average, $($Min)ms minimum, $($Max)ms maximum." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Scripts/check-vpn.ps1 b/Scripts/check-vpn.ps1 index dbd0fe05..46521d0e 100755 --- a/Scripts/check-vpn.ps1 +++ b/Scripts/check-vpn.ps1 @@ -15,12 +15,12 @@ try { $FoundOne = $false $Connections = (Get-VPNConnection) foreach($Connection in $Connections) { - "VPN $($Connection.Name) is $($Connection.ConnectionStatus)." + "✅ VPN $($Connection.Name) is $($Connection.ConnectionStatus)." $FoundOne = $true } - if (!$FoundOne) { throw "No VPN connection available" } + if (!$FoundOne) { "⚠️ No VPN connection configured" } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 -} +} \ No newline at end of file