mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-23 10:28:23 +02:00
Update check-bios.ps1
This commit is contained in:
parent
b1c54049c6
commit
2adca6ae53
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script queries the BIOS status and prints it.
|
This PowerShell script queries the BIOS status and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-bios
|
PS> ./check-bios
|
||||||
✅ BIOS F6 by American Megatrends Inc. (version ALASKA - 1072009, S/N NXA82EV0EBB0760)
|
✅ BIOS 'F6', release ALASKA - 1072009, S/N NXA82EV0EBB0760 by American Megatrends Inc.
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -24,14 +24,14 @@ try {
|
|||||||
}
|
}
|
||||||
Write-Progress -completed "."
|
Write-Progress -completed "."
|
||||||
} else {
|
} else {
|
||||||
Write-Progress "⏳ Querying BIOS..."
|
# Write-Progress "⏳ Querying BIOS..."
|
||||||
$BIOS = Get-CimInstance -ClassName Win32_BIOS
|
$BIOS = Get-CimInstance -ClassName Win32_BIOS
|
||||||
$Model = $BIOS.Name.Trim()
|
$Model = $BIOS.Name.Trim()
|
||||||
$Manufacturer = $BIOS.Manufacturer.Trim()
|
$Manufacturer = $BIOS.Manufacturer.Trim()
|
||||||
$Serial = $BIOS.SerialNumber.Trim()
|
$Serial = $BIOS.SerialNumber.Trim()
|
||||||
$Version = $BIOS.Version.Trim()
|
$Version = $BIOS.Version.Trim()
|
||||||
Write-Progress -completed "."
|
# Write-Progress -completed "."
|
||||||
Write-Host "✅ BIOS $Model by $Manufacturer (version $Version, S/N $Serial)"
|
Write-Host "✅ BIOS '$Model', release $Version, S/N $Serial by $Manufacturer"
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user