WmiMonitorID class

The WmiMonitorID WMI class represents the identifying information about a video monitor, such as manufacturer name, year of manufacture, or serial number. The data in this class correspond to data in the Vendor/Product Identification block of Video Input Definition of the Video Electronics Standard Association (VESA) Enhanced Extended Display Identification Data (E-EDID) standard.

Syntax

class WmiMonitorID : MSMonitorClass
{
  boolean Active;
  string  InstanceName;
  uint16  ManufacturerName[];
  uint16  ManufacturerNameLength;
  uint16  ProductCodeID[];
  uint16  SerialNumberID[];
  uint8   WeekOfManufacture;
  uint16  YearOfManufacture;
  uint16  UserFriendlyName[];
  uint16  UserFriendlyNameLength;
};

Members

The WmiMonitorID class has these types of members:

Properties

The WmiMonitorID class has these properties.

Active

Data type: boolean

Access type: Read-only

Indicates the active monitor.

InstanceName

Data type: string

Access type: Read-only

Qualifiers: Key

Name of the specific monitor instance.

ManufacturerName

Data type: uint16 array

Access type: Read-only

Name of manufacturer.

ManufacturerNameLength

Data type: uint16

Access type: Read-only

Length of manufacturer name located in the ManufacturerName property.

ProductCodeID

Data type: uint16 array

Access type: Read-only

Vendor assigned product code ID.

SerialNumberID

Data type: uint16 array

Access type: Read-only

Serial number.

UserFriendlyName

Data type: uint16 array

Access type: Read-only

The friendly name of the monitor. The size of the name is the length specified by the UserFriendlyNameLength property.

UserFriendlyNameLength

Data type: uint16

Access type: Read-only

Number of characters in the name located in the UserFriendlyName property.

WeekOfManufacture

Data type: uint8

Access type: Read-only

Week of manufacture by week number. The range is from 1 through 53. Zero (0) is undefined.

YearOfManufacture

Data type: uint16

Access type: Read-only

Year of manufacture.

Remarks

For a discussion on how to translate the arrays that store serial number ID's, see the Reporting Monitor information with Configuration Manager blog article.

Examples

The following PowerShell example retrieves the serial number of multiple monitors.

gwmi WmiMonitorID -Namespace root\wmi | ForEach-Object {($_.UserFriendlyName -ne 0 | foreach {[char]$_}) -join ""; ($_.SerialNumberID -ne 0 | foreach {[char]$_}) -join ""}

The following VBScript code also retrieves monitor ID information from a system.

Option Explicit

Dim strComputer, objWMIService, colItems, objItem

strComputer = "MyComputer"

Set objWMIService = GetObject("winmgmts:" _ 
  & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _ 
  & strComputer & "\root\wmi") 

Set colItems = objWMIService.ExecQuery _
  ("SELECT * FROM WMIMonitorID")

For Each objItem In colItems
  Wscript.Echo objItem.InstanceName
Next

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\wmi
MOF
WmiCore.mof
DLL
WmiProv.dll

See also

MSMonitorClass