07-29-2020 04:02 AM
07-29-2020 04:02 AM
I am trying to create a query to obtain the MonitorID WMI data.
The issue is that the userfriedlyname column is sometimes stored as ASCII values. How do i convert this to human readable format.
here is the current query statement
select SMS_R_System.Name, SMS_R_System.SerialNumber, SMS_R_System.LastLogonUserName, SMS_G_System_SYSTEM_ENCLOSURE.Tag, SMS_G_System_WMIMONITORID.ManufacturerName, SMS_G_System_WMIMONITORID.UserFriendlyName, SMS_G_System_WMIMONITORID.SerialNumberID, SMS_G_System_WMIMONITORID.ProductCodeID, SMS_G_System_WMIMONITORID.UserFriendlyNameLength, SMS_G_System_WMIMONITORID.YearOfManufacture, SMS_G_System_WMIMONITORID.WeekOfManufacture, SMS_G_System_WMIMONITORID.Active, SMS_G_System_WMIMONITORID.InstanceName, SMS_G_System_WMIMONITORID.TimeStamp from SMS_R_System inner join SMS_G_System_WMIMONITORID on SMS_G_System_WMIMONITORID.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId order by SMS_R_System.Name
NOTE: This is query NOT a report.
07-30-2020 02:38 AM
@WerickV Where are you getting this data from? SMS_G_System_WMIMONITORID is not a default hardware inventory class, so I'm guessing that you extended your hardware inventory to include this information. By default, monitor information is collected from the "Desktop Monitor" (Win32_DesktopMonitor) WMI class and stored in the SMS_G_System_DESKTOP_MONITOR class. Have you tried using that one?
07-31-2020 02:01 AM
@Michiel Overweel I enabled collecting that standard class. The Win32_DesktopMonitor does not include manufacturer and serial etc.
07-31-2020 05:46 AM
@WerickV So I'm assuming you extended hardware inventory to include the WmiMonitorID class. Many properties of that class are stored not as string values, but as arrays of ASCII character codes. If you insist on using the WmiMonitorID class, that's something you'll have to live with. I don't think you can convert these arrays to strings using WQL, but it should be possible using SQL. You might be interested in this (old) blog article: Reporting Monitor information with Configuration Manager.