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 { try {
Write-Progress "Querying BIOS details..." Write-Progress "Querying BIOS details..."
if ($IsLinux) { 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 { } else {
$BIOS = Get-CimInstance -ClassName Win32_BIOS $BIOS = Get-CimInstance -ClassName Win32_BIOS
$Manufacturer = $BIOS.Manufacturer.Trim()
$Model = $BIOS.Name.Trim() $Model = $BIOS.Name.Trim()
$Manufacturer = $BIOS.Manufacturer.Trim()
$Serial = $BIOS.SerialNumber.Trim() $Serial = $BIOS.SerialNumber.Trim()
$Version = $BIOS.Version.Trim() $Version = $BIOS.Version.Trim()
"$Model BIOS by $Manufacturer (S/N $Serial, version $Version)" "$Model BIOS by $Manufacturer (S/N $Serial, version $Version)"