mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-17 05:51:09 +02: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.
|
This script checks the DNS resolution with frequently used domain names.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-dns
|
PS> ./check-dns
|
||||||
✔️ DNS resolves 11.8 domains/sec (177 domains in 15 sec)
|
✔️ DNS resolution is 11.8 domains per second
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -31,7 +31,7 @@ try {
|
|||||||
|
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
$Average = [math]::round($Count / $Elapsed, 1)
|
$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"
|
"✔️ $Reply"
|
||||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -33,6 +33,7 @@ if ($IsLinux) {
|
|||||||
& "$PSScriptRoot/check-cpu.ps1"
|
& "$PSScriptRoot/check-cpu.ps1"
|
||||||
& "$PSScriptRoot/check-dns.ps1"
|
& "$PSScriptRoot/check-dns.ps1"
|
||||||
& "$PSScriptRoot/check-ping.ps1"
|
& "$PSScriptRoot/check-ping.ps1"
|
||||||
|
& "$PSScriptRoot/check-vpn.ps1"
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||||
|
@ -15,9 +15,9 @@ try {
|
|||||||
$Connections = (Get-VPNConnection)
|
$Connections = (Get-VPNConnection)
|
||||||
$Reply = ""
|
$Reply = ""
|
||||||
foreach($Connection in $Connections) {
|
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"
|
"✔️ $Reply"
|
||||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||||
|
Loading…
Reference in New Issue
Block a user