mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-07 07:51:54 +02:00
Update check-vpn.ps1
This commit is contained in:
parent
a6936f6726
commit
ced7359b6d
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user