Win32_BIOS

The Win32_BIOS WMI class represents the attributes of the computer system's basic input/output services (BIOS) that are installed on a computer.

The Win32_BIOS WMI class represents the attributes of the computer system's basic input/output services (BIOS) that are installed on a computer.

Methods

Win32_BIOS has no methods.

Properties

Win32_BIOS returns 31 properties:

'BiosCharacteristics','BIOSVersion','BuildNumber','Caption','CodeSet',
'CurrentLanguage','Description','EmbeddedControllerMajorVersion','EmbeddedControllerMinorVersion',
'IdentificationCode','InstallableLanguages','InstallDate','LanguageEdition','ListOfLanguages',
'Manufacturer','Name','OtherTargetOS','PrimaryBIOS','ReleaseDate','SerialNumber','SMBIOSBIOSVersion',
'SMBIOSMajorVersion','SMBIOSMinorVersion','SMBIOSPresent','SoftwareElementID','SoftwareElementState',
'Status','SystemBiosMajorVersion','SystemBiosMinorVersion','TargetOperatingSystem','Version'

Unless explicitly marked as writeable, all properties are read-only. Read all properties for all instances:

Get-CimInstance -ClassName Win32_BIOS -Property *

Most WMI classes return one or more instances.

When Get-CimInstance returns no result, then apparently no instances of class Win32_BIOS exist. This is normal behavior.

Either the class is not implemented on your system (may be deprecated or due to missing drivers, i.e. CIM_VideoControllerResolution), or there are simply no physical representations of this class currently available (i.e. Win32_TapeDrive).

BiosCharacteristics

UINT16 ARRAY

Array of BIOS characteristics supported by the system as defined by the System Management BIOS Reference Specification.

This value comes from the BIOS Characteristics member of the BIOS Information structure in the SMBIOS information.

BiosCharacteristics returns a numeric value. To translate it into a meaningful text, use any of the following approaches:

Use a PowerShell Hashtable
$BiosCharacteristics_map = @{
      0 = 'Reserved'
      1 = 'Reserved'
      2 = 'Unknown'
      3 = 'BIOS Characteristics Not Supported'
      4 = 'ISA is supported'
      5 = 'MCA is supported'
      6 = 'EISA is supported'
      7 = 'PCI is supported'
      8 = 'PC Card (PCMCIA) is supported'
      9 = 'Plug and Play is supported'
     10 = 'APM is supported'
     11 = 'BIOS is Upgradeable (Flash)'
     12 = 'BIOS shadowing is allowed'
     13 = 'VL-VESA is supported'
     14 = 'ESCD support is available'
     15 = 'Boot from CD is supported'
     16 = 'Selectable Boot is supported'
     17 = 'BIOS ROM is socketed'
     18 = 'Boot From PC Card (PCMCIA) is supported'
     19 = 'EDD (Enhanced Disk Drive) Specification is supported'
     20 = 'Int 13h - Japanese Floppy for NEC 9800 1.2mb (3.5\", 1k Bytes/Sector, 360 RPM) is supported'
     21 = 'Int 13h - Japanese Floppy for Toshiba 1.2mb (3.5\", 360 RPM) is supported'
     22 = 'Int 13h - 5.25\" / 360 KB Floppy Services are supported'
     23 = 'Int 13h - 5.25\" /1.2MB Floppy Services are supported'
     24 = 'Int 13h - 3.5\" / 720 KB Floppy Services are supported'
     25 = 'Int 13h - 3.5\" / 2.88 MB Floppy Services are supported'
     26 = 'Int 5h, Print Screen Service is supported'
     27 = 'Int 9h, 8042 Keyboard services are supported'
     28 = 'Int 14h, Serial Services are supported'
     29 = 'Int 17h, printer services are supported'
     30 = 'Int 10h, CGA/Mono Video Services are supported'
     31 = 'NEC PC-98'
     32 = 'ACPI supported'
     33 = 'USB Legacy is supported'
     34 = 'AGP is supported'
     35 = 'I2O boot is supported'
     36 = 'LS-120 boot is supported'
     37 = 'ATAPI ZIP Drive boot is supported'
     38 = '1394 boot is supported'
     39 = 'Smart Battery supported'
}
Use a switch statement
switch([int]$value)
{
  0          {'Reserved'}
  1          {'Reserved'}
  2          {'Unknown'}
  3          {'BIOS Characteristics Not Supported'}
  4          {'ISA is supported'}
  5          {'MCA is supported'}
  6          {'EISA is supported'}
  7          {'PCI is supported'}
  8          {'PC Card (PCMCIA) is supported'}
  9          {'Plug and Play is supported'}
  10         {'APM is supported'}
  11         {'BIOS is Upgradeable (Flash)'}
  12         {'BIOS shadowing is allowed'}
  13         {'VL-VESA is supported'}
  14         {'ESCD support is available'}
  15         {'Boot from CD is supported'}
  16         {'Selectable Boot is supported'}
  17         {'BIOS ROM is socketed'}
  18         {'Boot From PC Card (PCMCIA) is supported'}
  19         {'EDD (Enhanced Disk Drive) Specification is supported'}
  20         {'Int 13h - Japanese Floppy for NEC 9800 1.2mb (3.5\", 1k Bytes/Sector, 360 RPM) is supported'}
  21         {'Int 13h - Japanese Floppy for Toshiba 1.2mb (3.5\", 360 RPM) is supported'}
  22         {'Int 13h - 5.25\" / 360 KB Floppy Services are supported'}
  23         {'Int 13h - 5.25\" /1.2MB Floppy Services are supported'}
  24         {'Int 13h - 3.5\" / 720 KB Floppy Services are supported'}
  25         {'Int 13h - 3.5\" / 2.88 MB Floppy Services are supported'}
  26         {'Int 5h, Print Screen Service is supported'}
  27         {'Int 9h, 8042 Keyboard services are supported'}
  28         {'Int 14h, Serial Services are supported'}
  29         {'Int 17h, printer services are supported'}
  30         {'Int 10h, CGA/Mono Video Services are supported'}
  31         {'NEC PC-98'}
  32         {'ACPI supported'}
  33         {'USB Legacy is supported'}
  34         {'AGP is supported'}
  35         {'I2O boot is supported'}
  36         {'LS-120 boot is supported'}
  37         {'ATAPI ZIP Drive boot is supported'}
  38         {'1394 boot is supported'}
  39         {'Smart Battery supported'}
  default    {"$value"}
}
Use Enum structure
Enum EnumBiosCharacteristics
{
  Reserved1                                                    = 0
  Reserved2                                                    = 1
  Unknown                                                      = 2
  BIOS_Characteristics_Not_Supported                           = 3
  ISA_is_supported                                             = 4
  MCA_is_supported                                             = 5
  EISA_is_supported                                            = 6
  PCI_is_supported                                             = 7
  PC_Card_PCMCIA_is_supported                                  = 8
  Plug_and_Play_is_supported                                   = 9
  APM_is_supported                                             = 10
  BIOS_is_Upgradeable_Flash                                    = 11
  BIOS_shadowing_is_allowed                                    = 12
  VL_VESA_is_supported                                         = 13
  ESCD_support_is_available                                    = 14
  Boot_from_CD_is_supported                                    = 15
  Selectable_Boot_is_supported                                 = 16
  BIOS_ROM_is_socketed                                         = 17
  Boot_From_PC_Card_PCMCIA_is_supported                        = 18
  EDD_Enhanced_Disk_Drive_Specification_is_supported           = 19
  Int_13h_Japanese_Floppy_for_NEC_9800_12mb_35_1k_BytesSector_360_RPM_is_supported = 20
  Int_13h_Japanese_Floppy_for_Toshiba_12mb_35_360_RPM_is_supported = 21
  Int_13h_525_360_KB_Floppy_Services_are_supported             = 22
  Int_13h_525_12MB_Floppy_Services_are_supported               = 23
  Int_13h_35_720_KB_Floppy_Services_are_supported              = 24
  Int_13h_35_288_MB_Floppy_Services_are_supported              = 25
  Int_5h_Print_Screen_Service_is_supported                     = 26
  Int_9h_8042_Keyboard_services_are_supported                  = 27
  Int_14h_Serial_Services_are_supported                        = 28
  Int_17h_printer_services_are_supported                       = 29
  Int_10h_CGAMono_Video_Services_are_supported                 = 30
  NEC_PC_98                                                    = 31
  ACPI_supported                                               = 32
  USB_Legacy_is_supported                                      = 33
  AGP_is_supported                                             = 34
  I2O_boot_is_supported                                        = 35
  LS_120_boot_is_supported                                     = 36
  ATAPI_ZIP_Drive_boot_is_supported                            = 37
  _1394_boot_is_supported                                      = 38
  Smart_Battery_supported                                      = 39
}

Examples

Use $BiosCharacteristics_map in a calculated property for Select-Object
<# 
  this example uses a hashtable to translate raw numeric values for 
  property "BiosCharacteristics" to friendly text

  Note: to use other properties than "BiosCharacteristics", look up the appropriate 
  translation hashtable for the property you would like to use instead.
#>

#region define hashtable to translate raw values to friendly text

# Please note: this hashtable is specific for property "BiosCharacteristics" 
# to translate other properties, use their translation table instead
$BiosCharacteristics_map = @{
      0 = 'Reserved'
      1 = 'Reserved'
      2 = 'Unknown'
      3 = 'BIOS Characteristics Not Supported'
      4 = 'ISA is supported'
      5 = 'MCA is supported'
      6 = 'EISA is supported'
      7 = 'PCI is supported'
      8 = 'PC Card (PCMCIA) is supported'
      9 = 'Plug and Play is supported'
     10 = 'APM is supported'
     11 = 'BIOS is Upgradeable (Flash)'
     12 = 'BIOS shadowing is allowed'
     13 = 'VL-VESA is supported'
     14 = 'ESCD support is available'
     15 = 'Boot from CD is supported'
     16 = 'Selectable Boot is supported'
     17 = 'BIOS ROM is socketed'
     18 = 'Boot From PC Card (PCMCIA) is supported'
     19 = 'EDD (Enhanced Disk Drive) Specification is supported'
     20 = 'Int 13h - Japanese Floppy for NEC 9800 1.2mb (3.5\", 1k Bytes/Sector, 360 RPM) is supported'
     21 = 'Int 13h - Japanese Floppy for Toshiba 1.2mb (3.5\", 360 RPM) is supported'
     22 = 'Int 13h - 5.25\" / 360 KB Floppy Services are supported'
     23 = 'Int 13h - 5.25\" /1.2MB Floppy Services are supported'
     24 = 'Int 13h - 3.5\" / 720 KB Floppy Services are supported'
     25 = 'Int 13h - 3.5\" / 2.88 MB Floppy Services are supported'
     26 = 'Int 5h, Print Screen Service is supported'
     27 = 'Int 9h, 8042 Keyboard services are supported'
     28 = 'Int 14h, Serial Services are supported'
     29 = 'Int 17h, printer services are supported'
     30 = 'Int 10h, CGA/Mono Video Services are supported'
     31 = 'NEC PC-98'
     32 = 'ACPI supported'
     33 = 'USB Legacy is supported'
     34 = 'AGP is supported'
     35 = 'I2O boot is supported'
     36 = 'LS-120 boot is supported'
     37 = 'ATAPI ZIP Drive boot is supported'
     38 = '1394 boot is supported'
     39 = 'Smart Battery supported'
}

#endregion define hashtable

#region define calculated property (to be used with Select-Object)

<#
  a calculated property is defined by a hashtable with keys "Name" and "Expression"
  "Name" defines the name of the property (in this example, it is "BiosCharacteristics", but you can rename it to anything else)
  "Expression" defines a scriptblock that calculates the content of this property
  in this example, the scriptblock uses the hashtable defined earlier to translate each numeric
  value to its friendly text counterpart:
#>
 
$BiosCharacteristics = @{
  Name = 'BiosCharacteristics'
  Expression = {
    # property is an array, so process all values
    $result = foreach($value in $_.BiosCharacteristics)
    {
        # important: convert original value to [int] because
        # hashtable keys are type-aware:
        $BiosCharacteristics_map[[int]$value]
    }
    # uncomment to get a comma-separated string instead
    # of a string array:
    $result <#-join ', '#>
  }  
}
#endregion define calculated property

# retrieve the instances, and output the properties "Caption" and "BiosCharacteristics". The latter
# is defined by the hashtable in $BiosCharacteristics: 
Get-CimInstance -Class Win32_BIOS | Select-Object -Property Caption, $BiosCharacteristics

# ...or dump content of property BiosCharacteristics:
$friendlyValues = Get-CimInstance -Class Win32_BIOS | 
    Select-Object -Property $BiosCharacteristics |
    Select-Object -ExpandProperty BiosCharacteristics

# output values
$friendlyValues

# output values as comma separated list
$friendlyValues -join ', '

# output values as bullet list
$friendlyValues | ForEach-Object { "- $_" }
Use $BiosCharacteristics_map to directly translate raw values from an instance
<# 
  this example uses a hashtable to manually translate raw numeric values 
  for property "Win32_BIOS" to friendly text. This approach is ideal when there
  is just one instance to work with.

  Note: to use other properties than "Win32_BIOS", look up the appropriate 
  translation hashtable for the property you would like to use instead.
#>

#region define hashtable to translate raw values to friendly text

# Please note: this hashtable is specific for property "Win32_BIOS" 
# to translate other properties, use their translation table instead
$BiosCharacteristics_map = @{
      0 = 'Reserved'
      1 = 'Reserved'
      2 = 'Unknown'
      3 = 'BIOS Characteristics Not Supported'
      4 = 'ISA is supported'
      5 = 'MCA is supported'
      6 = 'EISA is supported'
      7 = 'PCI is supported'
      8 = 'PC Card (PCMCIA) is supported'
      9 = 'Plug and Play is supported'
     10 = 'APM is supported'
     11 = 'BIOS is Upgradeable (Flash)'
     12 = 'BIOS shadowing is allowed'
     13 = 'VL-VESA is supported'
     14 = 'ESCD support is available'
     15 = 'Boot from CD is supported'
     16 = 'Selectable Boot is supported'
     17 = 'BIOS ROM is socketed'
     18 = 'Boot From PC Card (PCMCIA) is supported'
     19 = 'EDD (Enhanced Disk Drive) Specification is supported'
     20 = 'Int 13h - Japanese Floppy for NEC 9800 1.2mb (3.5\", 1k Bytes/Sector, 360 RPM) is supported'
     21 = 'Int 13h - Japanese Floppy for Toshiba 1.2mb (3.5\", 360 RPM) is supported'
     22 = 'Int 13h - 5.25\" / 360 KB Floppy Services are supported'
     23 = 'Int 13h - 5.25\" /1.2MB Floppy Services are supported'
     24 = 'Int 13h - 3.5\" / 720 KB Floppy Services are supported'
     25 = 'Int 13h - 3.5\" / 2.88 MB Floppy Services are supported'
     26 = 'Int 5h, Print Screen Service is supported'
     27 = 'Int 9h, 8042 Keyboard services are supported'
     28 = 'Int 14h, Serial Services are supported'
     29 = 'Int 17h, printer services are supported'
     30 = 'Int 10h, CGA/Mono Video Services are supported'
     31 = 'NEC PC-98'
     32 = 'ACPI supported'
     33 = 'USB Legacy is supported'
     34 = 'AGP is supported'
     35 = 'I2O boot is supported'
     36 = 'LS-120 boot is supported'
     37 = 'ATAPI ZIP Drive boot is supported'
     38 = '1394 boot is supported'
     39 = 'Smart Battery supported'
}

#endregion define hashtable

# get one instance:
$instance = Get-CimInstance -Class Win32_BIOS | Select-Object -First 1

<#
  IMPORTANT: this example processes only one instance to illustrate
  the number-to-text translation. To process all instances, replace
  "Select-Object -First 1" with a "Foreach-Object" loop, and use
  the iterator variable $_ instead of $instance
#>

# query the property (hint: the property is an array!)
$rawValues = $instance.BiosCharacteristics  

# translate all raw values into friendly names:
$friendlyNames = foreach($rawValue in $rawValues)
{ $BiosCharacteristics_map[[int]$rawValue] }

# output values
$friendlyValues

# output values as comma separated list
$friendlyValues -join ', '

# output values as bullet list
$friendlyValues | ForEach-Object { "- $_" }
Use a switch statement inside a calculated property for Select-Object
<# 
  this example uses a switch clause to translate raw numeric 
  values for property "BiosCharacteristics" to friendly text. The switch
  clause is embedded into a calculated property so there is
  no need to refer to external variables for translation.

  Note: to use other properties than "BiosCharacteristics", look up the appropriate 
  translation switch clause for the property you would like to use instead.
#>

#region define calculated property (to be used with Select-Object)

<#
  a calculated property is defined by a hashtable with keys "Name" and "Expression"
  "Name" defines the name of the property (in this example, it is "BiosCharacteristics", but you can rename it to anything else)
  "Expression" defines a scriptblock that calculates the content of this property
  in this example, the scriptblock uses the hashtable defined earlier to translate each numeric
  value to its friendly text counterpart:
#>
 
$BiosCharacteristics = @{
  Name = 'BiosCharacteristics'
  Expression = {
    # property is an array, so process all values
    $result = foreach($value in $_.BiosCharacteristics)
    {
        switch([int]$value)
      {
        0          {'Reserved'}
        1          {'Reserved'}
        2          {'Unknown'}
        3          {'BIOS Characteristics Not Supported'}
        4          {'ISA is supported'}
        5          {'MCA is supported'}
        6          {'EISA is supported'}
        7          {'PCI is supported'}
        8          {'PC Card (PCMCIA) is supported'}
        9          {'Plug and Play is supported'}
        10         {'APM is supported'}
        11         {'BIOS is Upgradeable (Flash)'}
        12         {'BIOS shadowing is allowed'}
        13         {'VL-VESA is supported'}
        14         {'ESCD support is available'}
        15         {'Boot from CD is supported'}
        16         {'Selectable Boot is supported'}
        17         {'BIOS ROM is socketed'}
        18         {'Boot From PC Card (PCMCIA) is supported'}
        19         {'EDD (Enhanced Disk Drive) Specification is supported'}
        20         {'Int 13h - Japanese Floppy for NEC 9800 1.2mb (3.5\", 1k Bytes/Sector, 360 RPM) is supported'}
        21         {'Int 13h - Japanese Floppy for Toshiba 1.2mb (3.5\", 360 RPM) is supported'}
        22         {'Int 13h - 5.25\" / 360 KB Floppy Services are supported'}
        23         {'Int 13h - 5.25\" /1.2MB Floppy Services are supported'}
        24         {'Int 13h - 3.5\" / 720 KB Floppy Services are supported'}
        25         {'Int 13h - 3.5\" / 2.88 MB Floppy Services are supported'}
        26         {'Int 5h, Print Screen Service is supported'}
        27         {'Int 9h, 8042 Keyboard services are supported'}
        28         {'Int 14h, Serial Services are supported'}
        29         {'Int 17h, printer services are supported'}
        30         {'Int 10h, CGA/Mono Video Services are supported'}
        31         {'NEC PC-98'}
        32         {'ACPI supported'}
        33         {'USB Legacy is supported'}
        34         {'AGP is supported'}
        35         {'I2O boot is supported'}
        36         {'LS-120 boot is supported'}
        37         {'ATAPI ZIP Drive boot is supported'}
        38         {'1394 boot is supported'}
        39         {'Smart Battery supported'}
        default    {"$value"}
      }
      
    }
    $result
  }  
}
#endregion define calculated property

# retrieve all instances...
Get-CimInstance -ClassName Win32_BIOS | 
  # ...and output properties "Caption" and "BiosCharacteristics". The latter is defined
  # by the hashtable in $BiosCharacteristics:
  Select-Object -Property Caption, $BiosCharacteristics
Use the Enum from above to auto-translate the code values
<# 
  this example translates raw values by means of type conversion
  the friendly names are defined as enumeration using the
  keyword "enum" (PowerShell 5 or better)
  
  The raw value(s) are translated to friendly text by 
  simply converting them into the enum type.
  
  Note: to use other properties than "Win32_BIOS", look up the appropriate 
  enum definition for the property you would like to use instead.
#>


#region define enum with value-to-text translation:
Enum EnumBiosCharacteristics
{
  Reserved1                                                    = 0
  Reserved2                                                    = 1
  Unknown                                                      = 2
  BIOS_Characteristics_Not_Supported                           = 3
  ISA_is_supported                                             = 4
  MCA_is_supported                                             = 5
  EISA_is_supported                                            = 6
  PCI_is_supported                                             = 7
  PC_Card_PCMCIA_is_supported                                  = 8
  Plug_and_Play_is_supported                                   = 9
  APM_is_supported                                             = 10
  BIOS_is_Upgradeable_Flash                                    = 11
  BIOS_shadowing_is_allowed                                    = 12
  VL_VESA_is_supported                                         = 13
  ESCD_support_is_available                                    = 14
  Boot_from_CD_is_supported                                    = 15
  Selectable_Boot_is_supported                                 = 16
  BIOS_ROM_is_socketed                                         = 17
  Boot_From_PC_Card_PCMCIA_is_supported                        = 18
  EDD_Enhanced_Disk_Drive_Specification_is_supported           = 19
  Int_13h_Japanese_Floppy_for_NEC_9800_12mb_35_1k_BytesSector_360_RPM_is_supported = 20
  Int_13h_Japanese_Floppy_for_Toshiba_12mb_35_360_RPM_is_supported = 21
  Int_13h_525_360_KB_Floppy_Services_are_supported             = 22
  Int_13h_525_12MB_Floppy_Services_are_supported               = 23
  Int_13h_35_720_KB_Floppy_Services_are_supported              = 24
  Int_13h_35_288_MB_Floppy_Services_are_supported              = 25
  Int_5h_Print_Screen_Service_is_supported                     = 26
  Int_9h_8042_Keyboard_services_are_supported                  = 27
  Int_14h_Serial_Services_are_supported                        = 28
  Int_17h_printer_services_are_supported                       = 29
  Int_10h_CGAMono_Video_Services_are_supported                 = 30
  NEC_PC_98                                                    = 31
  ACPI_supported                                               = 32
  USB_Legacy_is_supported                                      = 33
  AGP_is_supported                                             = 34
  I2O_boot_is_supported                                        = 35
  LS_120_boot_is_supported                                     = 36
  ATAPI_ZIP_Drive_boot_is_supported                            = 37
  _1394_boot_is_supported                                      = 38
  Smart_Battery_supported                                      = 39
}

#endregion define enum

# get one instance:
$instance = Get-CimInstance -Class Win32_BIOS | Select-Object -First 1

<#
  IMPORTANT: this example processes only one instance to focus on
  the number-to-text type conversion. 
  
  To process all instances, replace   "Select-Object -First 1" 
  with a "Foreach-Object" loop, and use the iterator variable 
  $_ instead of $instance
#>

# query the property:
$rawValue = $instance.BiosCharacteristics

#region using strict type conversion

<#
  Note: strict type conversion fails if the raw value is 
  not defined by the enum. So if the list of allowable values
  was extended and the enum does not match the value,
  an exception is thrown
#>

# convert the property to the enum **BiosCharacteristics** 
[EnumBiosCharacteristics[]]$rawValue 

# get a comma-separated string:
[EnumBiosCharacteristics[]]$rawValue -join ',' 
#endregion

#region using operator "-as"

<#
  Note: the operator "-as" accepts values not defined
  by the enum and returns $null instead of throwing
  an exception
#>

$rawValue -as [EnumBiosCharacteristics[]]
#endregion

Enums must cover all possible values. If BiosCharacteristics returns a value that is not defined in the enum, an exception occurs. The exception reports the value that was missing in the enum. To fix, add the missing value to the enum.

BIOSVersion

STRING ARRAY

Array of the complete system BIOS information. In many computers there can be several version strings that are stored in the registry and represent the system BIOS information.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, BIOSVersion

BuildNumber

STRING MAX 64 CHAR

Internal identifier for this compilation of this software element.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, BuildNumber

Caption

STRING MAX 64 CHAR

Short description of the object a one-line string.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, Caption

CodeSet

STRING MAX 64 CHAR

Code set used by this software element.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, CodeSet

CurrentLanguage

STRING

Name of the current BIOS language.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, CurrentLanguage

Description

STRING

Description of the object.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, Description

EmbeddedControllerMajorVersion

UINT8

The major release of the embedded controller firmware.

This value comes from the Embedded Controller Firmware Major Release member of the BIOS Information structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, EmbeddedControllerMajorVersion

EmbeddedControllerMinorVersion

UINT8

The minor release of the embedded controller firmware.

This value comes from the Embedded Controller Firmware Minor Release member of the BIOS Information structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, EmbeddedControllerMinorVersion

IdentificationCode

STRING MAX 64 CHAR

Manufacturer’s identifier for this software element. Often this will be a stock keeping unit (SKU) or a part number.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, IdentificationCode

InstallableLanguages

UINT16

Number of languages available for installation on this system. Language may determine properties such as the need for Unicode and bidirectional text.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, InstallableLanguages

InstallDate

DATETIME

Date and time the object was installed. This property does not need a value to indicate that the object is installed.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, InstallDate

LanguageEdition

STRING MAX 32 CHAR

Language edition of this software element. The language codes defined in ISO 639 should be used. Where the software element represents a multilingual or international version of a product, the string “multilingual” should be used.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, LanguageEdition

ListOfLanguages

STRING ARRAY

Array of names of available BIOS-installable languages.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, ListOfLanguages

Manufacturer

STRING

Manufacturer of this software element.

This value comes from the Vendor member of the BIOS Information structure in the SMBIOS information.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, Manufacturer

Name

KEY PROPERTY STRING MAX 256 CHAR

Name used to identify this software element.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem

OtherTargetOS

STRING MAX 64 CHAR

Records the manufacturer and operating system type for a software element when the TargetOperatingSystem property has a value of 1 (Other). When TargetOperatingSystem has a value of 1, OtherTargetOS must have a nonnull value. For all other values of TargetOperatingSystem, OtherTargetOS is NULL.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, OtherTargetOS

PrimaryBIOS

BOOLEAN

If TRUE, this is the primary BIOS of the computer system.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, PrimaryBIOS

ReleaseDate

DATETIME

Release date of the Windows BIOS in the Coordinated Universal Time (UTC) format of YYYYMMDDHHMMSS.MMMMMM(+-)OOO.

This value comes from the BIOS Release Date member of the BIOS Information structure in the SMBIOS information.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, ReleaseDate

SerialNumber

STRING MAX 64 CHAR

Assigned serial number of the software element.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, SerialNumber

SMBIOSBIOSVersion

STRING

BIOS version as reported by SMBIOS.

This value comes from the BIOS Version member of the BIOS Information structure in the SMBIOS information.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, SMBIOSBIOSVersion

SMBIOSMajorVersion

UINT16

Major SMBIOS version number. This property is NULL if SMBIOS is not found.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, SMBIOSMajorVersion

SMBIOSMinorVersion

UINT16

Minor SMBIOS version number. This property is NULL if SMBIOS is not found.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, SMBIOSMinorVersion

SMBIOSPresent

BOOLEAN

If true, the SMBIOS is available on this computer system.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, SMBIOSPresent

SoftwareElementID

KEY PROPERTY STRING MAX 256 CHAR

Identifier for this software element; designed to be used in conjunction with other keys to create a unique representation of this instance.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem

SoftwareElementState

KEY PROPERTY UINT16

State of a software element.

SoftwareElementState returns a numeric value. To translate it into a meaningful text, use any of the following approaches:

Use a PowerShell Hashtable
$SoftwareElementState_map = @{
      0 = 'Deployable'
      1 = 'Installable'
      2 = 'Executable'
      3 = 'Running'
}
Use a switch statement
switch([int]$value)
{
  0          {'Deployable'}
  1          {'Installable'}
  2          {'Executable'}
  3          {'Running'}
  default    {"$value"}
}
Use Enum structure
Enum EnumSoftwareElementState
{
  Deployable    = 0
  Installable   = 1
  Executable    = 2
  Running       = 3
}

Examples

Use $SoftwareElementState_map in a calculated property for Select-Object
<# 
  this example uses a hashtable to translate raw numeric values for 
  property "SoftwareElementState" to friendly text

  Note: to use other properties than "SoftwareElementState", look up the appropriate 
  translation hashtable for the property you would like to use instead.
#>

#region define hashtable to translate raw values to friendly text

# Please note: this hashtable is specific for property "SoftwareElementState" 
# to translate other properties, use their translation table instead
$SoftwareElementState_map = @{
      0 = 'Deployable'
      1 = 'Installable'
      2 = 'Executable'
      3 = 'Running'
}

#endregion define hashtable

#region define calculated property (to be used with Select-Object)

<#
  a calculated property is defined by a hashtable with keys "Name" and "Expression"
  "Name" defines the name of the property (in this example, it is "SoftwareElementState", but you can rename it to anything else)
  "Expression" defines a scriptblock that calculates the content of this property
  in this example, the scriptblock uses the hashtable defined earlier to translate each numeric
  value to its friendly text counterpart:
#>
 
$SoftwareElementState = @{
  Name = 'SoftwareElementState'
  Expression = {
    # property is an array, so process all values
    $value = $_.SoftwareElementState
    $SoftwareElementState_map[[int]$value]
  }  
}
#endregion define calculated property

# retrieve the instances, and output the properties "Caption" and "SoftwareElementState". The latter
# is defined by the hashtable in $SoftwareElementState: 
Get-CimInstance -Class Win32_BIOS | Select-Object -Property Caption, $SoftwareElementState

# ...or dump content of property SoftwareElementState:
$friendlyValues = Get-CimInstance -Class Win32_BIOS | 
    Select-Object -Property $SoftwareElementState |
    Select-Object -ExpandProperty SoftwareElementState

# output values
$friendlyValues

# output values as comma separated list
$friendlyValues -join ', '

# output values as bullet list
$friendlyValues | ForEach-Object { "- $_" }
Use $SoftwareElementState_map to directly translate raw values from an instance
<# 
  this example uses a hashtable to manually translate raw numeric values 
  for property "Win32_BIOS" to friendly text. This approach is ideal when
  there is just one instance to work with.

  Note: to use other properties than "Win32_BIOS", look up the appropriate 
  translation hashtable for the property you would like to use instead.
#>

#region define hashtable to translate raw values to friendly text

# Please note: this hashtable is specific for property "Win32_BIOS" 
# to translate other properties, use their translation table instead
$SoftwareElementState_map = @{
      0 = 'Deployable'
      1 = 'Installable'
      2 = 'Executable'
      3 = 'Running'
}

#endregion define hashtable

# get one instance:
$instance = Get-CimInstance -Class Win32_BIOS | Select-Object -First 1

<#
  IMPORTANT: this example processes only one instance to illustrate
  the number-to-text translation. To process all instances, replace
  "Select-Object -First 1" with a "Foreach-Object" loop, and use
  the iterator variable $_ instead of $instance
#>

# query the property
$rawValue = $instance.SoftwareElementState  

# translate raw value to friendly text:
$friendlyName = $SoftwareElementState_map[[int]$rawValue]

# output value
$friendlyName
Use a switch statement inside a calculated property for Select-Object
<# 
  this example uses a switch clause to translate raw numeric 
  values for property "SoftwareElementState" to friendly text. The switch
  clause is embedded into a calculated property so there is
  no need to refer to external variables for translation.

  Note: to use other properties than "SoftwareElementState", look up the appropriate 
  translation switch clause for the property you would like to use instead.
#>

#region define calculated property (to be used with Select-Object)

<#
  a calculated property is defined by a hashtable with keys "Name" and "Expression"
  "Name" defines the name of the property (in this example, it is "SoftwareElementState", but you can rename it to anything else)
  "Expression" defines a scriptblock that calculates the content of this property
  in this example, the scriptblock uses the hashtable defined earlier to translate each numeric
  value to its friendly text counterpart:
#>
 
$SoftwareElementState = @{
  Name = 'SoftwareElementState'
  Expression = {
    # property is an array, so process all values
    $value = $_.SoftwareElementState
    
    switch([int]$value)
      {
        0          {'Deployable'}
        1          {'Installable'}
        2          {'Executable'}
        3          {'Running'}
        default    {"$value"}
      }
      
  }  
}
#endregion define calculated property

# retrieve all instances...
Get-CimInstance -ClassName Win32_BIOS | 
  # ...and output properties "Caption" and "SoftwareElementState". The latter is defined
  # by the hashtable in $SoftwareElementState:
  Select-Object -Property Caption, $SoftwareElementState
Use the Enum from above to auto-translate the code values
<# 
  this example translates raw values by means of type conversion
  the friendly names are defined as enumeration using the
  keyword "enum" (PowerShell 5 or better)
  
  The raw value(s) are translated to friendly text by 
  simply converting them into the enum type.
  
  Note: to use other properties than "Win32_BIOS", look up the appropriate 
  enum definition for the property you would like to use instead.
#>


#region define enum with value-to-text translation:
Enum EnumSoftwareElementState
{
  Deployable    = 0
  Installable   = 1
  Executable    = 2
  Running       = 3
}

#endregion define enum

# get one instance:
$instance = Get-CimInstance -Class Win32_BIOS | Select-Object -First 1

<#
  IMPORTANT: this example processes only one instance to focus on
  the number-to-text type conversion. 
  
  To process all instances, replace   "Select-Object -First 1" 
  with a "Foreach-Object" loop, and use the iterator variable 
  $_ instead of $instance
#>

# query the property:
$rawValue = $instance.SoftwareElementState

#region using strict type conversion

<#
  Note: strict type conversion fails if the raw value is 
  not defined by the enum. So if the list of allowable values
  was extended and the enum does not match the value,
  an exception is thrown
#>

# convert the property to the enum **SoftwareElementState** 
[EnumSoftwareElementState]$rawValue 

# get a comma-separated string:
[EnumSoftwareElementState]$rawValue -join ',' 
#endregion

#region using operator "-as"

<#
  Note: the operator "-as" accepts values not defined
  by the enum and returns $null instead of throwing
  an exception
#>

$rawValue -as [EnumSoftwareElementState]
#endregion

Enums must cover all possible values. If SoftwareElementState returns a value that is not defined in the enum, an exception occurs. The exception reports the value that was missing in the enum. To fix, add the missing value to the enum.

Status

STRING MAX 10 CHAR

Current status of an object. Various operational and nonoperational statuses can be defined. Available values:

$values = 'Degraded','Error','Lost Comm','No Contact','NonRecover','OK','Pred Fail','Service','Starting','Stopping','Stressed','Unknown'
Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, Status

SystemBiosMajorVersion

UINT8

The major release of the System BIOS.

This value comes from the System BIOS Major Release member of the BIOS Information structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, SystemBiosMajorVersion

SystemBiosMinorVersion

UINT8

The minor release of the System BIOS.

This value comes from the System BIOS Minor Release member of the BIOS Information structure in the SMBIOS information.

Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: This property is not supported before Windows 10 and Windows Server 2016.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, SystemBiosMinorVersion

TargetOperatingSystem

KEY PROPERTY UINT16

Target operating system of the owning software element.

TargetOperatingSystem returns a numeric value. To translate it into a meaningful text, use any of the following approaches:

Use a PowerShell Hashtable
$TargetOperatingSystem_map = @{
      0 = 'Unknown'
      1 = 'Other'
      2 = 'MACOS'
      3 = 'ATTUNIX'
      4 = 'DGUX'
      5 = 'DECNT'
      6 = 'Digital Unix'
      7 = 'OpenVMS'
      8 = 'HPUX'
      9 = 'AIX'
     10 = 'MVS'
     11 = 'OS400'
     12 = 'OS/2'
     13 = 'JavaVM'
     14 = 'MSDOS'
     15 = 'WIN3x'
     16 = 'WIN95'
     17 = 'WIN98'
     18 = 'WINNT'
     19 = 'WINCE'
     20 = 'NCR3000'
     21 = 'NetWare'
     22 = 'OSF'
     23 = 'DC/OS'
     24 = 'Reliant UNIX'
     25 = 'SCO UnixWare'
     26 = 'SCO OpenServer'
     27 = 'Sequent'
     28 = 'IRIX'
     29 = 'Solaris'
     30 = 'SunOS'
     31 = 'U6000'
     32 = 'ASERIES'
     33 = 'TandemNSK'
     34 = 'TandemNT'
     35 = 'BS2000'
     36 = 'LINUX'
     37 = 'Lynx'
     38 = 'XENIX'
     39 = 'VM/ESA'
     40 = 'Interactive UNIX'
     41 = 'BSDUNIX'
     42 = 'FreeBSD'
     43 = 'NetBSD'
     44 = 'GNU Hurd'
     45 = 'OS9'
     46 = 'MACH Kernel'
     47 = 'Inferno'
     48 = 'QNX'
     49 = 'EPOC'
     50 = 'IxWorks'
     51 = 'VxWorks'
     52 = 'MiNT'
     53 = 'BeOS'
     54 = 'HP MPE'
     55 = 'NextStep'
     56 = 'PalmPilot'
     57 = 'Rhapsody'
     58 = 'Windows 2000'
     59 = 'Dedicated'
     60 = 'VSE'
     61 = 'TPF'
}
Use a switch statement
switch([int]$value)
{
  0          {'Unknown'}
  1          {'Other'}
  2          {'MACOS'}
  3          {'ATTUNIX'}
  4          {'DGUX'}
  5          {'DECNT'}
  6          {'Digital Unix'}
  7          {'OpenVMS'}
  8          {'HPUX'}
  9          {'AIX'}
  10         {'MVS'}
  11         {'OS400'}
  12         {'OS/2'}
  13         {'JavaVM'}
  14         {'MSDOS'}
  15         {'WIN3x'}
  16         {'WIN95'}
  17         {'WIN98'}
  18         {'WINNT'}
  19         {'WINCE'}
  20         {'NCR3000'}
  21         {'NetWare'}
  22         {'OSF'}
  23         {'DC/OS'}
  24         {'Reliant UNIX'}
  25         {'SCO UnixWare'}
  26         {'SCO OpenServer'}
  27         {'Sequent'}
  28         {'IRIX'}
  29         {'Solaris'}
  30         {'SunOS'}
  31         {'U6000'}
  32         {'ASERIES'}
  33         {'TandemNSK'}
  34         {'TandemNT'}
  35         {'BS2000'}
  36         {'LINUX'}
  37         {'Lynx'}
  38         {'XENIX'}
  39         {'VM/ESA'}
  40         {'Interactive UNIX'}
  41         {'BSDUNIX'}
  42         {'FreeBSD'}
  43         {'NetBSD'}
  44         {'GNU Hurd'}
  45         {'OS9'}
  46         {'MACH Kernel'}
  47         {'Inferno'}
  48         {'QNX'}
  49         {'EPOC'}
  50         {'IxWorks'}
  51         {'VxWorks'}
  52         {'MiNT'}
  53         {'BeOS'}
  54         {'HP MPE'}
  55         {'NextStep'}
  56         {'PalmPilot'}
  57         {'Rhapsody'}
  58         {'Windows 2000'}
  59         {'Dedicated'}
  60         {'VSE'}
  61         {'TPF'}
  default    {"$value"}
}
Use Enum structure
Enum EnumTargetOperatingSystem
{
  Unknown            = 0
  Other              = 1
  MACOS              = 2
  ATTUNIX            = 3
  DGUX               = 4
  DECNT              = 5
  Digital_Unix       = 6
  OpenVMS            = 7
  HPUX               = 8
  AIX                = 9
  MVS                = 10
  OS400              = 11
  OS2                = 12
  JavaVM             = 13
  MSDOS              = 14
  WIN3x              = 15
  WIN95              = 16
  WIN98              = 17
  WINNT              = 18
  WINCE              = 19
  NCR3000            = 20
  NetWare            = 21
  OSF                = 22
  DCOS               = 23
  Reliant_UNIX       = 24
  SCO_UnixWare       = 25
  SCO_OpenServer     = 26
  Sequent            = 27
  IRIX               = 28
  Solaris            = 29
  SunOS              = 30
  U6000              = 31
  ASERIES            = 32
  TandemNSK          = 33
  TandemNT           = 34
  BS2000             = 35
  LINUX              = 36
  Lynx               = 37
  XENIX              = 38
  VMESA              = 39
  Interactive_UNIX   = 40
  BSDUNIX            = 41
  FreeBSD            = 42
  NetBSD             = 43
  GNU_Hurd           = 44
  OS9                = 45
  MACH_Kernel        = 46
  Inferno            = 47
  QNX                = 48
  EPOC               = 49
  IxWorks            = 50
  VxWorks            = 51
  MiNT               = 52
  BeOS               = 53
  HP_MPE             = 54
  NextStep           = 55
  PalmPilot          = 56
  Rhapsody           = 57
  Windows_2000       = 58
  Dedicated          = 59
  VSE                = 60
  TPF                = 61
}

Examples

Use $TargetOperatingSystem_map in a calculated property for Select-Object
<# 
  this example uses a hashtable to translate raw numeric values for 
  property "TargetOperatingSystem" to friendly text

  Note: to use other properties than "TargetOperatingSystem", look up the appropriate 
  translation hashtable for the property you would like to use instead.
#>

#region define hashtable to translate raw values to friendly text

# Please note: this hashtable is specific for property "TargetOperatingSystem" 
# to translate other properties, use their translation table instead
$TargetOperatingSystem_map = @{
      0 = 'Unknown'
      1 = 'Other'
      2 = 'MACOS'
      3 = 'ATTUNIX'
      4 = 'DGUX'
      5 = 'DECNT'
      6 = 'Digital Unix'
      7 = 'OpenVMS'
      8 = 'HPUX'
      9 = 'AIX'
     10 = 'MVS'
     11 = 'OS400'
     12 = 'OS/2'
     13 = 'JavaVM'
     14 = 'MSDOS'
     15 = 'WIN3x'
     16 = 'WIN95'
     17 = 'WIN98'
     18 = 'WINNT'
     19 = 'WINCE'
     20 = 'NCR3000'
     21 = 'NetWare'
     22 = 'OSF'
     23 = 'DC/OS'
     24 = 'Reliant UNIX'
     25 = 'SCO UnixWare'
     26 = 'SCO OpenServer'
     27 = 'Sequent'
     28 = 'IRIX'
     29 = 'Solaris'
     30 = 'SunOS'
     31 = 'U6000'
     32 = 'ASERIES'
     33 = 'TandemNSK'
     34 = 'TandemNT'
     35 = 'BS2000'
     36 = 'LINUX'
     37 = 'Lynx'
     38 = 'XENIX'
     39 = 'VM/ESA'
     40 = 'Interactive UNIX'
     41 = 'BSDUNIX'
     42 = 'FreeBSD'
     43 = 'NetBSD'
     44 = 'GNU Hurd'
     45 = 'OS9'
     46 = 'MACH Kernel'
     47 = 'Inferno'
     48 = 'QNX'
     49 = 'EPOC'
     50 = 'IxWorks'
     51 = 'VxWorks'
     52 = 'MiNT'
     53 = 'BeOS'
     54 = 'HP MPE'
     55 = 'NextStep'
     56 = 'PalmPilot'
     57 = 'Rhapsody'
     58 = 'Windows 2000'
     59 = 'Dedicated'
     60 = 'VSE'
     61 = 'TPF'
}

#endregion define hashtable

#region define calculated property (to be used with Select-Object)

<#
  a calculated property is defined by a hashtable with keys "Name" and "Expression"
  "Name" defines the name of the property (in this example, it is "TargetOperatingSystem", but you can rename it to anything else)
  "Expression" defines a scriptblock that calculates the content of this property
  in this example, the scriptblock uses the hashtable defined earlier to translate each numeric
  value to its friendly text counterpart:
#>
 
$TargetOperatingSystem = @{
  Name = 'TargetOperatingSystem'
  Expression = {
    # property is an array, so process all values
    $value = $_.TargetOperatingSystem
    $TargetOperatingSystem_map[[int]$value]
  }  
}
#endregion define calculated property

# retrieve the instances, and output the properties "Caption" and "TargetOperatingSystem". The latter
# is defined by the hashtable in $TargetOperatingSystem: 
Get-CimInstance -Class Win32_BIOS | Select-Object -Property Caption, $TargetOperatingSystem

# ...or dump content of property TargetOperatingSystem:
$friendlyValues = Get-CimInstance -Class Win32_BIOS | 
    Select-Object -Property $TargetOperatingSystem |
    Select-Object -ExpandProperty TargetOperatingSystem

# output values
$friendlyValues

# output values as comma separated list
$friendlyValues -join ', '

# output values as bullet list
$friendlyValues | ForEach-Object { "- $_" }
Use $TargetOperatingSystem_map to directly translate raw values from an instance
<# 
  this example uses a hashtable to manually translate raw numeric values 
  for property "Win32_BIOS" to friendly text. This approach is ideal when
  there is just one instance to work with.

  Note: to use other properties than "Win32_BIOS", look up the appropriate 
  translation hashtable for the property you would like to use instead.
#>

#region define hashtable to translate raw values to friendly text

# Please note: this hashtable is specific for property "Win32_BIOS" 
# to translate other properties, use their translation table instead
$TargetOperatingSystem_map = @{
      0 = 'Unknown'
      1 = 'Other'
      2 = 'MACOS'
      3 = 'ATTUNIX'
      4 = 'DGUX'
      5 = 'DECNT'
      6 = 'Digital Unix'
      7 = 'OpenVMS'
      8 = 'HPUX'
      9 = 'AIX'
     10 = 'MVS'
     11 = 'OS400'
     12 = 'OS/2'
     13 = 'JavaVM'
     14 = 'MSDOS'
     15 = 'WIN3x'
     16 = 'WIN95'
     17 = 'WIN98'
     18 = 'WINNT'
     19 = 'WINCE'
     20 = 'NCR3000'
     21 = 'NetWare'
     22 = 'OSF'
     23 = 'DC/OS'
     24 = 'Reliant UNIX'
     25 = 'SCO UnixWare'
     26 = 'SCO OpenServer'
     27 = 'Sequent'
     28 = 'IRIX'
     29 = 'Solaris'
     30 = 'SunOS'
     31 = 'U6000'
     32 = 'ASERIES'
     33 = 'TandemNSK'
     34 = 'TandemNT'
     35 = 'BS2000'
     36 = 'LINUX'
     37 = 'Lynx'
     38 = 'XENIX'
     39 = 'VM/ESA'
     40 = 'Interactive UNIX'
     41 = 'BSDUNIX'
     42 = 'FreeBSD'
     43 = 'NetBSD'
     44 = 'GNU Hurd'
     45 = 'OS9'
     46 = 'MACH Kernel'
     47 = 'Inferno'
     48 = 'QNX'
     49 = 'EPOC'
     50 = 'IxWorks'
     51 = 'VxWorks'
     52 = 'MiNT'
     53 = 'BeOS'
     54 = 'HP MPE'
     55 = 'NextStep'
     56 = 'PalmPilot'
     57 = 'Rhapsody'
     58 = 'Windows 2000'
     59 = 'Dedicated'
     60 = 'VSE'
     61 = 'TPF'
}

#endregion define hashtable

# get one instance:
$instance = Get-CimInstance -Class Win32_BIOS | Select-Object -First 1

<#
  IMPORTANT: this example processes only one instance to illustrate
  the number-to-text translation. To process all instances, replace
  "Select-Object -First 1" with a "Foreach-Object" loop, and use
  the iterator variable $_ instead of $instance
#>

# query the property
$rawValue = $instance.TargetOperatingSystem  

# translate raw value to friendly text:
$friendlyName = $TargetOperatingSystem_map[[int]$rawValue]

# output value
$friendlyName
Use a switch statement inside a calculated property for Select-Object
<# 
  this example uses a switch clause to translate raw numeric 
  values for property "TargetOperatingSystem" to friendly text. The switch
  clause is embedded into a calculated property so there is
  no need to refer to external variables for translation.

  Note: to use other properties than "TargetOperatingSystem", look up the appropriate 
  translation switch clause for the property you would like to use instead.
#>

#region define calculated property (to be used with Select-Object)

<#
  a calculated property is defined by a hashtable with keys "Name" and "Expression"
  "Name" defines the name of the property (in this example, it is "TargetOperatingSystem", but you can rename it to anything else)
  "Expression" defines a scriptblock that calculates the content of this property
  in this example, the scriptblock uses the hashtable defined earlier to translate each numeric
  value to its friendly text counterpart:
#>
 
$TargetOperatingSystem = @{
  Name = 'TargetOperatingSystem'
  Expression = {
    # property is an array, so process all values
    $value = $_.TargetOperatingSystem
    
    switch([int]$value)
      {
        0          {'Unknown'}
        1          {'Other'}
        2          {'MACOS'}
        3          {'ATTUNIX'}
        4          {'DGUX'}
        5          {'DECNT'}
        6          {'Digital Unix'}
        7          {'OpenVMS'}
        8          {'HPUX'}
        9          {'AIX'}
        10         {'MVS'}
        11         {'OS400'}
        12         {'OS/2'}
        13         {'JavaVM'}
        14         {'MSDOS'}
        15         {'WIN3x'}
        16         {'WIN95'}
        17         {'WIN98'}
        18         {'WINNT'}
        19         {'WINCE'}
        20         {'NCR3000'}
        21         {'NetWare'}
        22         {'OSF'}
        23         {'DC/OS'}
        24         {'Reliant UNIX'}
        25         {'SCO UnixWare'}
        26         {'SCO OpenServer'}
        27         {'Sequent'}
        28         {'IRIX'}
        29         {'Solaris'}
        30         {'SunOS'}
        31         {'U6000'}
        32         {'ASERIES'}
        33         {'TandemNSK'}
        34         {'TandemNT'}
        35         {'BS2000'}
        36         {'LINUX'}
        37         {'Lynx'}
        38         {'XENIX'}
        39         {'VM/ESA'}
        40         {'Interactive UNIX'}
        41         {'BSDUNIX'}
        42         {'FreeBSD'}
        43         {'NetBSD'}
        44         {'GNU Hurd'}
        45         {'OS9'}
        46         {'MACH Kernel'}
        47         {'Inferno'}
        48         {'QNX'}
        49         {'EPOC'}
        50         {'IxWorks'}
        51         {'VxWorks'}
        52         {'MiNT'}
        53         {'BeOS'}
        54         {'HP MPE'}
        55         {'NextStep'}
        56         {'PalmPilot'}
        57         {'Rhapsody'}
        58         {'Windows 2000'}
        59         {'Dedicated'}
        60         {'VSE'}
        61         {'TPF'}
        default    {"$value"}
      }
      
  }  
}
#endregion define calculated property

# retrieve all instances...
Get-CimInstance -ClassName Win32_BIOS | 
  # ...and output properties "Caption" and "TargetOperatingSystem". The latter is defined
  # by the hashtable in $TargetOperatingSystem:
  Select-Object -Property Caption, $TargetOperatingSystem
Use the Enum from above to auto-translate the code values
<# 
  this example translates raw values by means of type conversion
  the friendly names are defined as enumeration using the
  keyword "enum" (PowerShell 5 or better)
  
  The raw value(s) are translated to friendly text by 
  simply converting them into the enum type.
  
  Note: to use other properties than "Win32_BIOS", look up the appropriate 
  enum definition for the property you would like to use instead.
#>


#region define enum with value-to-text translation:
Enum EnumTargetOperatingSystem
{
  Unknown            = 0
  Other              = 1
  MACOS              = 2
  ATTUNIX            = 3
  DGUX               = 4
  DECNT              = 5
  Digital_Unix       = 6
  OpenVMS            = 7
  HPUX               = 8
  AIX                = 9
  MVS                = 10
  OS400              = 11
  OS2                = 12
  JavaVM             = 13
  MSDOS              = 14
  WIN3x              = 15
  WIN95              = 16
  WIN98              = 17
  WINNT              = 18
  WINCE              = 19
  NCR3000            = 20
  NetWare            = 21
  OSF                = 22
  DCOS               = 23
  Reliant_UNIX       = 24
  SCO_UnixWare       = 25
  SCO_OpenServer     = 26
  Sequent            = 27
  IRIX               = 28
  Solaris            = 29
  SunOS              = 30
  U6000              = 31
  ASERIES            = 32
  TandemNSK          = 33
  TandemNT           = 34
  BS2000             = 35
  LINUX              = 36
  Lynx               = 37
  XENIX              = 38
  VMESA              = 39
  Interactive_UNIX   = 40
  BSDUNIX            = 41
  FreeBSD            = 42
  NetBSD             = 43
  GNU_Hurd           = 44
  OS9                = 45
  MACH_Kernel        = 46
  Inferno            = 47
  QNX                = 48
  EPOC               = 49
  IxWorks            = 50
  VxWorks            = 51
  MiNT               = 52
  BeOS               = 53
  HP_MPE             = 54
  NextStep           = 55
  PalmPilot          = 56
  Rhapsody           = 57
  Windows_2000       = 58
  Dedicated          = 59
  VSE                = 60
  TPF                = 61
}

#endregion define enum

# get one instance:
$instance = Get-CimInstance -Class Win32_BIOS | Select-Object -First 1

<#
  IMPORTANT: this example processes only one instance to focus on
  the number-to-text type conversion. 
  
  To process all instances, replace   "Select-Object -First 1" 
  with a "Foreach-Object" loop, and use the iterator variable 
  $_ instead of $instance
#>

# query the property:
$rawValue = $instance.TargetOperatingSystem

#region using strict type conversion

<#
  Note: strict type conversion fails if the raw value is 
  not defined by the enum. So if the list of allowable values
  was extended and the enum does not match the value,
  an exception is thrown
#>

# convert the property to the enum **TargetOperatingSystem** 
[EnumTargetOperatingSystem]$rawValue 

# get a comma-separated string:
[EnumTargetOperatingSystem]$rawValue -join ',' 
#endregion

#region using operator "-as"

<#
  Note: the operator "-as" accepts values not defined
  by the enum and returns $null instead of throwing
  an exception
#>

$rawValue -as [EnumTargetOperatingSystem]
#endregion

Enums must cover all possible values. If TargetOperatingSystem returns a value that is not defined in the enum, an exception occurs. The exception reports the value that was missing in the enum. To fix, add the missing value to the enum.

Version

STRING

Version of the BIOS. This string is created by the BIOS manufacturer.

Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property Name, SoftwareElementID, SoftwareElementState, TargetOperatingSystem, Version

Examples

List all instances of Win32_BIOS
Get-CimInstance -ClassName Win32_BIOS

Learn more about Get-CimInstance and the deprecated Get-WmiObject.

View all properties
Get-CimInstance -ClassName Win32_BIOS -Property *
View key properties only
Get-CimInstance -ClassName Win32_BIOS -KeyOnly

Selecting Properties

To select only some properties, pipe the results to Select-Object -Property a,b,c with a comma-separated list of the properties you require. Wildcards are permitted.

Get-CimInstance always returns all properties but only retrieves the ones that you specify. All other properties are empty but still present. That’s why you need to pipe the results into Select-Object if you want to limit the visible properties, i.e. for reporting.

Selecting Properties

The code below lists all available properties. Remove the ones you do not need:

$properties = 'BiosCharacteristics',
              'BIOSVersion',
              'BuildNumber',
              'Caption',
              'CodeSet',
              'CurrentLanguage',
              'Description',
              'EmbeddedControllerMajorVersion',
              'EmbeddedControllerMinorVersion',
              'IdentificationCode',
              'InstallableLanguages',
              'InstallDate',
              'LanguageEdition',
              'ListOfLanguages',
              'Manufacturer',
              'Name',
              'OtherTargetOS',
              'PrimaryBIOS',
              'ReleaseDate',
              'SerialNumber',
              'SMBIOSBIOSVersion',
              'SMBIOSMajorVersion',
              'SMBIOSMinorVersion',
              'SMBIOSPresent',
              'SoftwareElementID',
              'SoftwareElementState',
              'Status',
              'SystemBiosMajorVersion',
              'SystemBiosMinorVersion',
              'TargetOperatingSystem',
              'Version'
Get-CimInstance -ClassName Win32_BIOS | Select-Object -Property $properties
Limiting Network Bandwidth

If you work remotely, it makes sense to limit network bandwidth by filtering the properties on the server side, too:

Get-CimInstance -Class Win32_BIOS -Property $property | 
Select-Object -Property $property

Selecting Instances

To select some instances, use Get-CimInstance and a WMI Query. The wildcard character in WMI Queries is % (and not “*”).

The parameter -Filter runs a simple query.

Listing all instances where the property Caption starts with “A”
Get-CimInstance -Class Win32_BIOS -Filter 'Caption LIKE "a%"' 
Using a WQL Query

The parameter -Query uses a query similar to SQL and combines the parameters -Filter and -Property. This returns all instances where the property Caption starts with “A”, and returns the properties specified:

Get-CimInstance -Query "SELECT InstallDate, SMBIOSMajorVersion, EmbeddedControllerMinorVersion, BIOSVersion FROM Win32_BIOS WHERE Caption LIKE 'a%'"

Any property you did not specify is still present but empty. You might need to use Select-Object to remove all unwanted properties:

Get-CimInstance -Query "SELECT InstallDate, SMBIOSMajorVersion, EmbeddedControllerMinorVersion, BIOSVersion FROM Win32_BIOS WHERE Caption LIKE 'a%'" | Select-Object -Property InstallDate, SMBIOSMajorVersion, EmbeddedControllerMinorVersion, BIOSVersion

Accessing Remote Computers

To access remote systems, you need to have proper permissions. User the parameter -ComputerName to access one or more remote systems.

Authenticating as Current User
# one or more computer names or IP addresses:
$list = 'server1', 'server2'

# authenticate with your current identity:
$result = Get-CimInstance -ClassName Win32_BIOS -ComputerName $list 
$result
Authenticating as Different User

Use a CIMSession object to authenticate with a new identity:

# one or more computer names or IP addresses:
$list = 'server1', 'server2'

# authenticate with a different identity:
$cred = Get-Credential -Message 'Authenticate to retrieve WMI information:'
$session = New-CimSession -ComputerName $list -Credential $cred

$result = Get-CimInstance Win32_BIOS -CimSession $session

# remove the session after use (if you do not plan to re-use it later)
Remove-CimSession -CimSession $session

$result

Learn more about accessing remote computers.

Requirements

To use Win32_BIOS, the following requirements apply:

PowerShell

Get-CimInstance was introduced with PowerShell Version 3.0, which in turn was introduced on clients with Windows 8 and on servers with Windows Server 2012.

If necessary, update Windows PowerShell to Windows PowerShell 5.1, or install PowerShell 7 side-by-side.

Operating System

Win32_BIOS was introduced on clients with Windows Vista and on servers with Windows Server 2008.

Namespace

Win32_BIOS lives in the Namespace Root/CIMV2. This is the default namespace. There is no need to use the -Namespace parameter in Get-CimInstance.

Implementation

Win32_BIOS is implemented in CIMWin32.dll and defined in CIMWin32.mof. Both files are located in the folder C:\Windows\system32\wbem:

explorer $env:windir\system32\wbem
notepad $env:windir\system32\wbem\CIMWin32.mof