# wmi-win32_bios.ps1
# Demonstrates use of Win32_Bios WMI class
# Thomas Lee - tfl@psp.co.uk
# Helper function to return characterics of the BIOS
function get-WmiBiosCharacteristics {
param ([uint16] $char)
# parse and return values
If ($char -le 39) {
switch ($char) {
0 {"00-Reserved"}
1 {"01-Reserved"}
2 {"02-Unknown"}
3 {"03-BIOS Characteristics Not Supported"}
4 {"04-ISA is supported"}
5 {"05-MCA is supported"}
6 {"06-EISA is supported"}
7 {"07-PCI is supported"}
8 {"08-PC Card (PCMCIA) is supported"}
9 {"09-Plug and Play is supported"}
10 {"10-APM is supported"}
11 {"11-BIOS is Upgradable (Flash)"}
12 {"12-BIOS shadowing is allowed"}
13 {"13-VL-VESA is supported"}
14 {"14-ESCD support is available"}
15 {"15-Boot from CD is supported"}
16 {"16-Selectable Boot is supported"}
17 {"17-BIOS ROM is socketed"}
18 {"18-Boot From PC Card (PCMCIA) is supported"}
19 {"19-EDD (Enhanced Disk Drive) Specification is supported"}
20 {"20-Int 13h - Japanese Floppy for NEC 9800 1.2mb (3.5, 1k Bytes/Sector, 360 RPM) is supported"}
21 {"21-Int 13h - Japanese Floppy for Toshiba 1.2mb (3.5, 360 RPM) is supported"}
22 {"22-Int 13h - 5.25 / 360 KB Floppy Services are supported"}
23 {"23-Int 13h - 5.25 /1.2MB Floppy Services are supported"}
24 {"24-Int 13h - 3.5 / 720 KB Floppy Services are supported"}
25 {"25-Int 13h - 3.5 / 2.88 MB Floppy Services are supported"}
26 {"26-Int 5h, Print Screen Service is supported"}
27 {"27-Int 9h, 8042 Keyboard services are supported"}
28 {"28-Int 14h, Serial Services are supported"}
29 {"29-Int 17h, printer services are supported"}
30 {"30-Int 10h, CGA/Mono Video Services are supported"}
31 {"31-NEC PC-98"}
32 {"32-ACPI supported"}
33 {"33-USB Legacy is supported"}
34 {"34-AGP is supported"}
35 {"35-I2O boot is supported"}
36 {"36-LS-120 boot is supported"}
37 {"37-ATAPI ZIP Drive boot is supported"}
38 {"38-1394 boot is supported"}
39 {"39-Smart Battery supported"}
}
Return
}
If ($char -ge 40 -and $char -le 45) {
"{0}-Reserved for BIOS vendor" -f $char
return
}
If ($char -ge 48 -and $char -le 63) {
"{0}-Reserved for system vendor" -f $char
return
}
"{0}-Unknown Value " -f $char
}
# Get BIOS information from WMI
$bios = Get-WMIObject Win32_Bios
# Display BIOS Details
"Win32_Bios WMI Information"
"Bios Characteristics"
foreach ($ch in $bios.BiosCharacteristics) {
" : {0}" -f (Get-WmiBiosCharacteristics($ch))
}
"Bios Version : {0}" -f $bios.BiosVersion
"Codeset : {0}" -f $bios.Codeset
"CurrentLanguage : {0}" -f $bios.CurrentLanguage
"Description : {0}" -f $bios.Description
"IdentificatonCode : {0}" -f $bios.IdentificatonCode
"InstallableLanguages : {0}" -f $bios.InstallableLanguages
"InstallDate : {0}" -f $bios.InstallDate
"LanguageEdition : {0}" -f $bios.LanguageEdition
"ListOfLanguages : {0}" -f $bios.ListOfLanguages
"Manufacturer : {0}" -f $bios.Manufacturer
"OtherTargetOS : {0}" -f $bios.OtherTargetOS
"PrimaryBIOS : {0}" -f $bios.PrimaryBIOS
"ReleaseDate : {0}" -f $bios.ReleaseDate
"SerialNumber : {0}" -f $bios.SerialNumber
"SMBIOSBIOSVersion : {0}" -f $bios.SMBIOSBIOSVersion
"SMBIOSMajorVersion : {0}" -f $bios.SMBIOSMajorVersion
"SMBIOSMinorVersion : {0}" -f $bios.SMBIOSMinorVersion
"SoftwareElementID : {0}" -f $bios.SoftwareElementID
"SoftwareElementState : {0}" -f $bios.SoftwareElementState
"TargetOperatingSystem : {0}" -f $bios.TargetOperatingSystem
"Version : {0}" -f $bios.Version