Updated check-bios.ps1

This commit is contained in:
Markus Fleschutz 2024-10-16 14:48:06 +02:00
parent dd7054cf48
commit 2666f952af

View File

@ -14,13 +14,12 @@
try { try {
if ($IsLinux) { if ($IsLinux) {
Write-Progress "Querying BIOS details..."
$model = (sudo dmidecode -s system-product-name) $model = (sudo dmidecode -s system-product-name)
if ("$model" -ne "") { if ("$model" -eq "") { exit 0 } # no information
$version = (sudo dmidecode -s bios-version) Write-Progress "Querying BIOS details..."
$releaseDate = (sudo dmidecode -s bios-release-date) $version = (sudo dmidecode -s bios-version)
$manufacturer = (sudo dmidecode -s system-manufacturer) $releaseDate = (sudo dmidecode -s bios-release-date)
} $manufacturer = (sudo dmidecode -s system-manufacturer)
Write-Progress -completed "Done." Write-Progress -completed "Done."
} else { } else {
$details = Get-CimInstance -ClassName Win32_BIOS $details = Get-CimInstance -ClassName Win32_BIOS