🧬 WQL / PowerShell

Win32_BIOS: Discovering Available Properties (Get-CimClass)

Uses Get-CimClass to list every real property and method Win32_BIOS exposes on the current system, instead of guessing from documentation.

By WindowsScripting.com · 813 B
BIOSDiscover.ps1
<#
.SYNOPSIS
    WQL/CIM reference: discovering Win32_BIOS's available properties.

.DESCRIPTION
    Before writing a WQL SELECT statement against an unfamiliar class,
    use Get-CimClass to list every property and method it actually
    exposes on this system — WMI classes vary slightly between Windows
    versions, so this beats guessing property names from documentation.

.EXAMPLE
    .\BIOSDiscover.ps1
#>

[CmdletBinding()]
param()

$cimClass = Get-CimClass -ClassName Win32_BIOS

Write-Host "Properties on Win32_BIOS:" -ForegroundColor DarkGray
$cimClass.CimClassProperties | Select-Object Name, CimType | Sort-Object Name | Format-Table -AutoSize

Write-Host "Methods on Win32_BIOS:" -ForegroundColor DarkGray
$cimClass.CimClassMethods | Select-Object Name | Sort-Object Name | Format-Table -AutoSize