Update some check-*.ps1 scripts

This commit is contained in:
Markus Fleschutz
2023-01-23 14:04:23 +01:00
parent fbd44c0c28
commit 34d6adef57
11 changed files with 35 additions and 34 deletions

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Checks BIOS details
Checks the BIOS
.DESCRIPTION
This PowerShell script queries and prints BIOS details.
This PowerShell script queries the BIOS status and prints it.
.EXAMPLE
PS> ./check-bios
✅ F6 BIOS by American Megatrends Inc. (S/N NXA82EV0EBB0760, version ALASKA - 1072009)
@ -13,7 +13,7 @@
#>
try {
Write-Progress "Querying BIOS details..."
Write-Progress "Querying BIOS details..."
if ($IsLinux) {
$Model = (sudo dmidecode -s system-product-name)
if ("$Model" -ne "") {
@ -30,9 +30,9 @@ try {
$Version = $BIOS.Version.Trim()
Write-Host "$Model BIOS by $Manufacturer (S/N $Serial, version $Version)"
}
Write-Progress -Completed " "
Write-Progress -completed "BIOS query finished."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
}