From 515369b93889f4b641b5c7da47157abf28598332 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 17 Apr 2023 21:38:20 +0200 Subject: [PATCH] Update check-vpn.ps1 --- Scripts/check-vpn.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/check-vpn.ps1 b/Scripts/check-vpn.ps1 index 6e1e3657..a7d5bc74 100755 --- a/Scripts/check-vpn.ps1 +++ b/Scripts/check-vpn.ps1 @@ -5,7 +5,7 @@ This PowerShell script queries the status of the VPN connections and prints it. .EXAMPLE PS> ./check-vpn - ✅ VPN 'NASA L2TP' is Disconnected + ✅ Disconnected VPN 'NASA L2TP' .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -19,13 +19,13 @@ try { } else { $Connections = Get-VPNConnection foreach($Connection in $Connections) { - Write-Host "✅ VPN '$($Connection.Name)' is $($Connection.ConnectionStatus)" + "✅ $($Connection.ConnectionStatus) VPN '$($Connection.Name)'" $NoVPN = $false } } - if ($NoVPN) { Write-Host "⚠️ No VPN connection" } + if ($NoVPN) { "⚠️ No VPN" } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 -} \ No newline at end of file +}