mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-26 14:26:10 +01:00
Update check-vpn.ps1
This commit is contained in:
parent
b3e6c4711f
commit
7bce556044
@ -5,7 +5,7 @@
|
||||
This script checks the DNS resolution with frequently used domain names.
|
||||
.EXAMPLE
|
||||
PS> ./check-dns
|
||||
✔️ DNS resolves 11.8 domains/sec (177 domains in 15 sec)
|
||||
✔️ DNS resolution is 11.8 domains per second
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -31,7 +31,7 @@ try {
|
||||
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
$Average = [math]::round($Count / $Elapsed, 1)
|
||||
$Reply = "DNS resolves $Average domains/sec ($Count in $Elapsed sec)"
|
||||
$Reply = "DNS resolution is $Average domains per second"
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
exit 0 # success
|
||||
|
@ -33,6 +33,7 @@ if ($IsLinux) {
|
||||
& "$PSScriptRoot/check-cpu.ps1"
|
||||
& "$PSScriptRoot/check-dns.ps1"
|
||||
& "$PSScriptRoot/check-ping.ps1"
|
||||
& "$PSScriptRoot/check-vpn.ps1"
|
||||
if ($IsLinux) {
|
||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||
|
@ -15,9 +15,9 @@ try {
|
||||
$Connections = (Get-VPNConnection)
|
||||
$Reply = ""
|
||||
foreach($Connection in $Connections) {
|
||||
$Reply += "connection $($Connection.Name) is $($Connection.ConnectionStatus), "
|
||||
$Reply += "VPN connection $($Connection.Name) is $($Connection.ConnectionStatus), "
|
||||
}
|
||||
if ("$Reply" -eq "") { $Reply = "No VPN connection available"
|
||||
if ("$Reply" -eq "") { $Reply = "No VPN connection available" }
|
||||
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
|
Loading…
Reference in New Issue
Block a user