Main example
List instances
# All instances of Win32_OnBoardDevice, with the main properties
Get-CimInstance -ClassName Win32_OnBoardDevice |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)Examples
Filter with WQL
# WQL filter evaluated by the provider: DeviceType = 3 (Video)
Get-CimInstance -ClassName Win32_OnBoardDevice -Filter 'DeviceType = 3' |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)The filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
Decode numeric values
# Lookup table for DeviceType (values documented by Microsoft)
$deviceTypeName = @{
1 = 'Other'
2 = 'Unknown'
3 = 'Video'
4 = 'SCSI Controller'
5 = 'Ethernet'
6 = 'Token Ring'
7 = 'Sound'
}
Get-CimInstance -ClassName Win32_OnBoardDevice |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)Query a remote computer (CIM session)
review before running# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
Get-CimInstance -CimSession $cimSession -ClassName Win32_OnBoardDevice |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)
} finally {
Remove-CimSession -CimSession $cimSession
}WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.
Show the class structure
# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName Win32_OnBoardDevice
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Caption# | string | read | Short description of the object. Code | |||||||||||||||||||||||||||||||||||||||
| CreationClassName# key | string | read | Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, the property allows all instances of this class and its subclasses to be uniquely identified. Code | |||||||||||||||||||||||||||||||||||||||
| Description# | string | read | Description of the object. Code | |||||||||||||||||||||||||||||||||||||||
| DeviceType# | uint16 | read | Type of device being represented. Values (7)
Code | |||||||||||||||||||||||||||||||||||||||
| Enabled# | boolean | read | If TRUE, the on-board device is available for use. Code | |||||||||||||||||||||||||||||||||||||||
| HotSwappable# | boolean | read | If TRUE, a physical package can be hot-swapped (if it is possible to replace the element with a physically different but equivalent one while the containing package has power applied to it). For example, a disk drive package inserted using SCA connectors is removable and can be hot-swapped. All packages that can be hot-swapped are inherently removable and replaceable. Code | |||||||||||||||||||||||||||||||||||||||
| InstallDate# | datetime | read | Date and time the object was installed. This property does not need a value to indicate that the object is installed. Code | |||||||||||||||||||||||||||||||||||||||
| Manufacturer# | string | read | Name of the organization responsible for producing the physical element. Code | |||||||||||||||||||||||||||||||||||||||
| Model# | string | read | Name by which the physical element is generally known. Code | |||||||||||||||||||||||||||||||||||||||
| Name# | string | read | Label by which the object is known. When subclassed, the property can be overridden to be a key property. Code | |||||||||||||||||||||||||||||||||||||||
| OtherIdentifyingInfo# | string | read | Additional data, beyond asset tag information, that could be used to identify a physical element. One example is bar code data associated with an element that also has an asset tag. Note that if only bar code data is available and is unique or able to be used as an element key, this property would be NULL and the bar code data is used as the class key in the tag property. Code | |||||||||||||||||||||||||||||||||||||||
| PartNumber# | string | read | Part number assigned by the organization responsible for producing or manufacturing the physical element. Code | |||||||||||||||||||||||||||||||||||||||
| PoweredOn# | boolean | read | If TRUE, the physical element is powered on. Code | |||||||||||||||||||||||||||||||||||||||
| Removable# | boolean | read | If TRUE, a physical package is removable (if it is designed to be taken in and out of the physical container in which it is normally found, without impairing the function of the overall packaging). A package can still be removable if power must be "off" to perform the removal. If power can be "on" and the package removed, then the element is removable and can be hot-swapped. For example, an extra battery in a laptop is removable, as is a disk drive package inserted using SCA connectors. However, the latter can be hot-swapped. A laptop's display is not removable, nor is a nonredundant power supply. Removing these components would affect the function of the overall packaging or is impossible due to the tight integration of the package. Code | |||||||||||||||||||||||||||||||||||||||
| Replaceable# | boolean | read | If TRUE, a physical package is replaceable (if it is possible to replace, FRU or upgrade, the element with a physically different one). For example, some computer systems allow the main processor chip to be upgraded to one of a higher clock rating. In this case, the processor is said to be replaceable. Another example is a power supply package mounted on sliding rails. All removable packages are inherently replaceable. Code | |||||||||||||||||||||||||||||||||||||||
| SerialNumber# | string | read | Manufacturer-allocated number used to identify the physical element. Code | |||||||||||||||||||||||||||||||||||||||
| SKU# | string | read | Stock-keeping unit number for the physical element. Code | |||||||||||||||||||||||||||||||||||||||
| Status# | string | read | Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states. Values include the following: Values (12)
Code | |||||||||||||||||||||||||||||||||||||||
| Tag# key | string | read | Unique identifier of the on-board device connected to the system. Example: "On Board Device 1" Code | |||||||||||||||||||||||||||||||||||||||
| Version# | string | read | Version of the physical element. Code |
Remarks
The Win32_OnBoardDevice class is derived from CIM_PhysicalComponent.
Inheritance
Superclass chain
- CIM_ManagedSystemElement
- CIM_PhysicalElement
- CIM_PhysicalComponent
- Win32_OnBoardDevice
Known subclasses
No known subclass.
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- Provider
- CIMWin32
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
Dynamic Provider("CIMWin32") UUID("{AEECF151-D0EA-11d2-ABFC-00805F538618}") AMENDMENT
Microsoft source
Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.