1
0
mirror of https://github.com/fleschutz/PowerShell.git synced 2025-07-05 07:00:04 +02:00

Update some check-*.ps1 scripts

This commit is contained in:
Markus Fleschutz
2023-04-11 10:48:59 +02:00
parent 094fca2665
commit 440f882eaf
11 changed files with 27 additions and 24 deletions

@ -1,10 +1,11 @@
<# <#
.SYNOPSIS .SYNOPSIS
Query app details Query the app status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries application details and lists it. This PowerShell script queries the application status and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-apps PS> ./check-apps
✅ 119 apps installed, 11 upgrades available
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES
@ -15,7 +16,7 @@ try {
if ($IsLinux) { if ($IsLinux) {
# TODO # TODO
} else { } else {
Write-Progress "⏳ Querying installed apps & updates..." Write-Progress "⏳ Querying installed apps and updates..."
$Apps = Get-AppxPackage $Apps = Get-AppxPackage
$Status = "$($Apps.Count) apps installed" $Status = "$($Apps.Count) apps installed"

@ -1,11 +1,11 @@
<# <#
.SYNOPSIS .SYNOPSIS
Checks the BIOS Checks the BIOS status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries the BIOS status and prints it. This PowerShell script queries the BIOS status and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-bios PS> ./check-bios
✅ BIOS F6 by American Megatrends Inc. (S/N NXA82EV0EBB0760, version ALASKA - 1072009) ✅ BIOS F6 by American Megatrends Inc. (version ALASKA - 1072009, S/N NXA82EV0EBB0760)
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES
@ -31,7 +31,7 @@ try {
$Serial = $BIOS.SerialNumber.Trim() $Serial = $BIOS.SerialNumber.Trim()
$Version = $BIOS.Version.Trim() $Version = $BIOS.Version.Trim()
Write-Progress -completed "." Write-Progress -completed "."
Write-Host "✅ BIOS $Model by $Manufacturer (S/N $Serial, version $Version)" Write-Host "✅ BIOS $Model by $Manufacturer (version $Version, S/N $Serial)"
} }
exit 0 # success exit 0 # success
} catch { } catch {

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Queries and prints CPU details Checks the CPU status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries CPU details (name, type, speed, temperature, etc.) and prints it. This PowerShell script queries the CPU status and prints it (name, type, speed, temperature, etc).
.EXAMPLE .EXAMPLE
PS> ./check-cpu PS> ./check-cpu
✅ AMD Ryzen 5 5500U with Radeon Graphics (CPU0, 2100MHz, 31.3°C) ✅ AMD Ryzen 5 5500U with Radeon Graphics (CPU0, 2100MHz, 31.3°C)

@ -1,6 +1,6 @@
<# <#
.SYNOPSIS .SYNOPSIS
Checks the firewall Checks the firewall status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries the status of the firewall and prints it. This PowerShell script queries the status of the firewall and prints it.
.EXAMPLE .EXAMPLE

@ -1,10 +1,11 @@
<# <#
.SYNOPSIS .SYNOPSIS
Checks the GPU Checks the GPU status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries GPU details and prints it. This PowerShell script queries the GPU status and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-gpu PS> ./check-gpu
✅ NVIDIA Quadro P400 GPU (2GB RAM, 3840x2160 pixels, 32 bit, 59 Hz, driver 31.0.15.1740, status OK)
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Query OS details Checks the OS status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries and lists operating system details. This PowerShell script queries the operating system status and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-os PS> ./check-os
✅ Windows 10 Pro 64-bit (v10.0.19045, since 6/22/2021, S/N 00123-45678-15135-AAOEM, P/K AB123-CD456-EF789-GH000-WFR6P) ✅ Windows 10 Pro 64-bit (v10.0.19045, since 6/22/2021, S/N 00123-45678-15135-AAOEM, P/K AB123-CD456-EF789-GH000-WFR6P)

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Check PowerShell details Check the PowerShell status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries PowerShell details and lists it. This PowerShell script queries the PowerShell status and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-powershell PS> ./check-powershell
✅ PowerShell 5.1.19041.2673 Desktop edition (10 modules, 1458 cmdlets, 172 aliases) ✅ PowerShell 5.1.19041.2673 Desktop edition (10 modules, 1458 cmdlets, 172 aliases)

@ -1,11 +1,11 @@
<# <#
.SYNOPSIS .SYNOPSIS
Checks the RAM Check the RAM status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries and prints details of the installed RAM. This PowerShell script queries the status of the installed RAM and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-ram PS> ./check-ram
8GB DDR4 RAM @ 3200MHz (1.2V) in P0 CHANNEL A/DIMM 0 by Samsung 16GB DDR4 RAM @ 3200MHz (1.2V) in P0 CHANNEL A/DIMM 0 by Samsung
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Checks SMART devices Checks the SMART device status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries S.M.A.R.T. HDD/SSD device details and prints it. This PowerShell script queries the status of the SSD/HDD devices (supporting S.M.A.R.T.) and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-smart-devices PS> ./check-smart-devices
✅ 1TB Samsung SSD 970 EVO via NVMe (2388 hours, 289x on, v2B2QEXE7, 37°C, selftest passed) ✅ 1TB Samsung SSD 970 EVO via NVMe (2388 hours, 289x on, v2B2QEXE7, 37°C, selftest passed)
@ -40,8 +40,8 @@ try {
$Devices = $(smartctl --scan-open) $Devices = $(smartctl --scan-open)
} }
Write-Progress "⏳ (3/3) Querying S.M.A.R.T devices..."
foreach($Device in $Devices) { foreach($Device in $Devices) {
Write-Progress "⏳ (3/3) Querying S.M.A.R.T devices..."
$Array = $Device.split(" ") $Array = $Device.split(" ")
$Device = $Array[0] $Device = $Array[0]
if ("$Device" -eq "#") { if ("$Device" -eq "#") {

@ -1,6 +1,6 @@
<# <#
.SYNOPSIS .SYNOPSIS
Checks the swap space Checks the swap space status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries the status of the swap space and prints it. This PowerShell script queries the status of the swap space and prints it.
.PARAMETER MinLevel .PARAMETER MinLevel

@ -1,10 +1,11 @@
<# <#
.SYNOPSIS .SYNOPSIS
Checks the VPN connection Checks the VPN status
.DESCRIPTION .DESCRIPTION
This PowerShell script queries status of the VPN connections and prints it. This PowerShell script queries the status of the VPN connections and prints it.
.EXAMPLE .EXAMPLE
PS> ./check-vpn PS> ./check-vpn
✅ VPN 'NASA L2TP' is Disconnected
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES