mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 16:33:20 +01:00
Update check-bios.ps1
This commit is contained in:
parent
d088f1f828
commit
92e029f433
@ -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)"
|
||||||
@ -28,4 +32,4 @@ try {
|
|||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user