mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-22 21:58:42 +01:00
Update the check-*.ps1 scripts
This commit is contained in:
parent
123494e015
commit
cbf046ba3e
@ -20,7 +20,7 @@ try {
|
||||
$Model = $BIOS.Name
|
||||
$SerialNumber = $BIOS.SerialNumber
|
||||
$Version = $BIOS.Version
|
||||
"✅ $Manufacturer $($Model) BIOS: S/N $SerialNumber, version $Version"
|
||||
"✅ BIOS $Manufacturer $($Model): S/N $SerialNumber, version $Version"
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
|
@ -28,7 +28,7 @@ try {
|
||||
$Average = [math]::round($NumRows / $Elapsed, 1)
|
||||
|
||||
if ($Average -gt 10.0) {
|
||||
"✅ DNS resolves $Average domains per second."
|
||||
"✅ DNS resolves $Average domains per second"
|
||||
} else {
|
||||
"⚠️ DNS resolves only $Average domains per second!"
|
||||
}
|
||||
|
@ -41,13 +41,13 @@ try {
|
||||
[int64]$Total = ($Used + $Free)
|
||||
|
||||
if ($Total -eq 0) {
|
||||
"✅ Drive $ID is empty."
|
||||
"✅ Drive $ID is empty"
|
||||
} elseif ($Free -lt $MinLevel) {
|
||||
"⚠️ Drive $ID has only $(Bytes2String $Free) of $(Bytes2String $Total) left to use!"
|
||||
} elseif ($Used -lt $Free) {
|
||||
"✅ Drive $ID uses $(Bytes2String $Used) of $(Bytes2String $Total)."
|
||||
"✅ Drive $ID uses $(Bytes2String $Used) of $(Bytes2String $Total)"
|
||||
} else {
|
||||
"✅ Drive $ID has $(Bytes2String $Free) of $(Bytes2String $Total) left."
|
||||
"✅ Drive $ID has $(Bytes2String $Free) of $(Bytes2String $Total) left to use"
|
||||
}
|
||||
}
|
||||
exit 0 # success
|
||||
|
@ -36,7 +36,7 @@ try {
|
||||
$RefreshRate = $Details.CurrentRefreshRate
|
||||
$DriverVersion = $Details.DriverVersion
|
||||
$Status = $Details.Status
|
||||
"✅ $($Model): $(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $BitsPerPixel bit, $RefreshRate Hz, driver $DriverVersion, status $Status"
|
||||
"✅ GPU $($Model): $(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $BitsPerPixel bit, $RefreshRate Hz, driver $DriverVersion, status $Status"
|
||||
}
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -11,16 +11,20 @@
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
& "$PSScriptRoot/check-operating-system.ps1"
|
||||
& "$PSScriptRoot/check-uptime.ps1"
|
||||
& "$PSScriptRoot/check-time-zone.ps1"
|
||||
& "$PSScriptRoot/check-bios.ps1"
|
||||
" "
|
||||
" ⭐️HARDWARE⭐️"
|
||||
& "$PSScriptRoot/check-cpu.ps1"
|
||||
& "$PSScriptRoot/check-ram.ps1"
|
||||
& "$PSScriptRoot/check-gpu.ps1"
|
||||
& "$PSScriptRoot/check-bios.ps1"
|
||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||
& "$PSScriptRoot/check-swap-space.ps1"
|
||||
& "$PSScriptRoot/check-drives.ps1"
|
||||
" "
|
||||
" ⭐️SOFTWARE⭐️"
|
||||
& "$PSScriptRoot/check-operating-system.ps1"
|
||||
& "$PSScriptRoot/check-uptime.ps1"
|
||||
& "$PSScriptRoot/check-time-zone.ps1"
|
||||
& "$PSScriptRoot/check-swap-space.ps1"
|
||||
& "$PSScriptRoot/check-dns.ps1"
|
||||
& "$PSScriptRoot/check-ping.ps1"
|
||||
& "$PSScriptRoot/check-vpn.ps1"
|
||||
|
@ -30,7 +30,7 @@ try {
|
||||
$Avg += $Latency
|
||||
}
|
||||
$Avg /= $Pings.count
|
||||
"✅ Ping is $($Avg)ms average, $($Min)ms min, $($Max)ms max."
|
||||
"✅ Ping is $($Avg)ms average, $($Min)ms min, $($Max)ms max"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -48,11 +48,11 @@ try {
|
||||
} elseif ($Free -lt $MinLevel) {
|
||||
"⚠️ Only $(MB2String $Free) of $(MB2String $Total) swap space left to use!"
|
||||
} elseif ($Used -eq 0) {
|
||||
"✅ $(MB2String $Total) swap space ready to use."
|
||||
"✅ $(MB2String $Total) swap space ready to use"
|
||||
} elseif ($Used -lt $Free) {
|
||||
"✅ $(MB2String $Used) of $(MB2String $Total) swap space in use."
|
||||
"✅ Swap space uses $(MB2String $Used) of $(MB2String $Total)"
|
||||
} else {
|
||||
"✅ $(MB2String $Free) of $(MB2String $Total) swap space left."
|
||||
"✅ Swap space has $(MB2String $Free) of $(MB2String $Total) left to use"
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
|
@ -18,11 +18,11 @@ try {
|
||||
} else {
|
||||
$Connections = (Get-VPNConnection)
|
||||
foreach($Connection in $Connections) {
|
||||
"✅ VPN '$($Connection.Name)' is $($Connection.ConnectionStatus)."
|
||||
"✅ VPN '$($Connection.Name)' is $($Connection.ConnectionStatus)"
|
||||
$NoVPN = $false
|
||||
}
|
||||
}
|
||||
if ($NoVPN) { "⚠️ No VPN connection." }
|
||||
if ($NoVPN) { "⚠️ No VPN connection" }
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user