Update check-vpn.ps1

This commit is contained in:
Markus Fleschutz 2023-09-13 08:34:59 +02:00
parent a6936f6726
commit ced7359b6d

View File

@ -5,7 +5,7 @@
This PowerShell script queries the status of the VPN connection(s) and prints it. This PowerShell script queries the status of the VPN connection(s) and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-vpn.ps1 PS> ./check-vpn.ps1
VPN disconnected to NASA L2TP VPN to NASA L2TP is connected
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES
@ -19,7 +19,7 @@ try {
} else { } else {
$Connections = Get-VPNConnection $Connections = Get-VPNConnection
foreach($Connection in $Connections) { foreach($Connection in $Connections) {
Write-Host "✅ VPN $($Connection.ConnectionStatus.ToLower()) to $($Connection.Name)" Write-Host "✅ VPN to $($Connection.Name) is $($Connection.ConnectionStatus.ToLower())"
$noVPN = $false $noVPN = $false
} }
} }