mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-06 22:19:09 +01:00
Updated check-network.ps1 and check-vpn.ps1
This commit is contained in:
parent
ece41fa2e9
commit
7841c95ad7
@ -20,9 +20,9 @@ Write-Host "`n N E T W O R K" -foregroundColor green
|
|||||||
& "$PSScriptRoot/list-local-ip.ps1"
|
& "$PSScriptRoot/list-local-ip.ps1"
|
||||||
& "$PSScriptRoot/ping-local-devices.ps1"
|
& "$PSScriptRoot/ping-local-devices.ps1"
|
||||||
& "$PSScriptRoot/list-network-shares.ps1"
|
& "$PSScriptRoot/list-network-shares.ps1"
|
||||||
& "$PSScriptRoot/check-vpn.ps1"
|
|
||||||
& "$PSScriptRoot/list-internet-ip.ps1"
|
& "$PSScriptRoot/list-internet-ip.ps1"
|
||||||
& "$PSScriptRoot/ping-internet.ps1"
|
& "$PSScriptRoot/ping-internet.ps1"
|
||||||
& "$PSScriptRoot/check-dns.ps1"
|
& "$PSScriptRoot/check-dns.ps1"
|
||||||
|
& "$PSScriptRoot/check-vpn.ps1"
|
||||||
& "$PSScriptRoot/list-ssh-key.ps1"
|
& "$PSScriptRoot/list-ssh-key.ps1"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -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 to NASA L2TP is connected
|
✅ Internet 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 to $($connection.Name) is $($connection.ConnectionStatus.ToLower())"
|
Write-Host "✅ Internet VPN to $($connection.Name) is $($connection.ConnectionStatus.ToLower())"
|
||||||
$noVPN = $false
|
$noVPN = $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user