From 2666f952af4a1ce6c21fbfcb5e643160fb1bf0ea Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 16 Oct 2024 14:48:06 +0200 Subject: [PATCH] Updated check-bios.ps1 --- scripts/check-bios.ps1 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/check-bios.ps1 b/scripts/check-bios.ps1 index 75dfe55e..a429fe3c 100755 --- a/scripts/check-bios.ps1 +++ b/scripts/check-bios.ps1 @@ -14,13 +14,12 @@ try { if ($IsLinux) { - Write-Progress "Querying BIOS details..." $model = (sudo dmidecode -s system-product-name) - if ("$model" -ne "") { - $version = (sudo dmidecode -s bios-version) - $releaseDate = (sudo dmidecode -s bios-release-date) - $manufacturer = (sudo dmidecode -s system-manufacturer) - } + if ("$model" -eq "") { exit 0 } # no information + Write-Progress "Querying BIOS details..." + $version = (sudo dmidecode -s bios-version) + $releaseDate = (sudo dmidecode -s bios-release-date) + $manufacturer = (sudo dmidecode -s system-manufacturer) Write-Progress -completed "Done." } else { $details = Get-CimInstance -ClassName Win32_BIOS