Categories

root\wmi – WmiMonitorColorCharacteristics

The rather long winded name of this class might put you off but it does show something useful

Get-WmiObject -Namespace root\wmi -Class WmiMonitorColorCharacteristics

produces these results (dropping the system properties)

Active           : True
Blue             : System.Management.ManagementBaseObject
DefaultWhite     : System.Management.ManagementBaseObject
Green            : System.Management.ManagementBaseObject
InstanceName     : DISPLAY\LGD6301\5&21e3487a&0&UID33554704_0
Red              : System.Management.ManagementBaseObject

As we have to drill down into these other objects we will create a function

function get-monitorColourCharacteristics {

$monitor = Get-WmiObject -Namespace root\wmi -Class WmiMonitorColorCharacteristics

$colours = New-Object -TypeName PSObject -Property @{
  Monitor = $monitor.InstanceName
  Active = $monitor.Active
}
$colours |
Add-Member -MemberType NoteProperty -Name "White XY" -Value @($monitor.DefaultWhite.X, $monitor.DefaultWhite.Y ) -PassThru |
Add-Member -MemberType NoteProperty -Name "Red XY" -Value @($monitor.Red.X, $monitor.Red.Y ) -PassThru |
Add-Member -MemberType NoteProperty -Name "Green XY" -Value @($monitor.Green.X, $monitor.Green.Y ) -PassThru |
Add-Member -MemberType NoteProperty -Name "Blue XY" -Value @($monitor.Blue.X, $monitor.Blue.Y )

$colours

}

The XY values are explained in these articles

http://en.wikipedia.org/wiki/International_Commission_on_Illumination

http://en.wikipedia.org/wiki/CIE_1931_color_space

Leave a Reply