Update check-bios.ps1

This commit is contained in:
Markus Fleschutz 2022-12-28 11:04:21 +01:00
parent d088f1f828
commit 92e029f433

View File

@ -15,11 +15,15 @@
try {
Write-Progress "Querying BIOS details..."
if ($IsLinux) {
# TODO
$Model = (sudo dmidecode -s system-product-name)
$Manufacturer = (sudo dmidecode -s system-manufacturer)
$Version = (sudo dmidecode -s bios-version)
$RelDate = (sudo dmidecode -s bios-release-date)
"$Model BIOS by $Manufacturer (version $Version as of $RelDate)"
} else {
$BIOS = Get-CimInstance -ClassName Win32_BIOS
$Manufacturer = $BIOS.Manufacturer.Trim()
$Model = $BIOS.Name.Trim()
$Manufacturer = $BIOS.Manufacturer.Trim()
$Serial = $BIOS.SerialNumber.Trim()
$Version = $BIOS.Version.Trim()
"$Model BIOS by $Manufacturer (S/N $Serial, version $Version)"
@ -28,4 +32,4 @@ try {
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
}