Update check-bios.ps1

This commit is contained in:
Markus Fleschutz 2023-07-24 09:44:11 +02:00
parent b1c54049c6
commit 2adca6ae53

View File

@ -5,7 +5,7 @@
This PowerShell script queries the BIOS status and prints it.
.EXAMPLE
PS> ./check-bios
BIOS F6 by American Megatrends Inc. (version ALASKA - 1072009, S/N NXA82EV0EBB0760)
BIOS 'F6', release ALASKA - 1072009, S/N NXA82EV0EBB0760 by American Megatrends Inc.
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -24,14 +24,14 @@ try {
}
Write-Progress -completed "."
} else {
Write-Progress "⏳ Querying BIOS..."
# Write-Progress "⏳ Querying BIOS..."
$BIOS = Get-CimInstance -ClassName Win32_BIOS
$Model = $BIOS.Name.Trim()
$Manufacturer = $BIOS.Manufacturer.Trim()
$Serial = $BIOS.SerialNumber.Trim()
$Version = $BIOS.Version.Trim()
Write-Progress -completed "."
Write-Host "✅ BIOS $Model by $Manufacturer (version $Version, S/N $Serial)"
# Write-Progress -completed "."
Write-Host "✅ BIOS '$Model', release $Version, S/N $Serial by $Manufacturer"
}
exit 0 # success
} catch {