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