mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 08:23:14 +01:00
Update check-bios.ps1
This commit is contained in:
parent
d088f1f828
commit
92e029f433
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user