Double Monitor Serial No

(imported topic written by mdahitule91)

Hi All,

I have used relavance posted on below mentioned link to find Monitor Sr. No. but it provides 2 results

http://forum.bigfix.com/viewtopic.php?id=1552

q: (concatenation of substrings separated by “%0a” of (if (exists first “000000fc00” of it) then hexadecimal string (first 24 of following texts of first “000000fc00” of it ) else “n/a”), concatenation of substrings separated by “%0a” of (if (exists first “000000ff00” of it) then hexadecimal string (first 24 of following texts of first “000000ff00” of it ) else “n/a”), (hexadecimal integer (first 2 of following text of position 32 of it )/4) as string & “/” & (1990+(hexadecimal integer (first 2 of following text of position 34 of it ))) as string) of (values “EDID” of keys ((“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum” & it & “\Device Parameters”) of (string values of selects “PNPDeviceID from Win32_DesktopMonitor” of wmi) ) of registry as string)

A: DELL E170S , M875N96J084S, 6/2009

A: DELL E170S , M875N96J084S, 6/2009

Is there any way that it will only provide only 1 result.

(imported comment written by BenKus)

Add "unique values of " to the front of the expression…

Ben

(imported comment written by mdahitule91)

Hi Ben,

Thanks for reply. I have added “unique values of” to the front of the expression but still the result is same.

Appologies if i have mistaken somewhere in writing expression, i m new to bigfix and still learning.

Kindly suggest.

(unique values of concatenation of substrings separated by “%0a” of (if (exists first “000000fc00” of it) then hexadecimal string (first 24 of following texts of first “000000fc00” of it ) else “n/a”), concatenation of substrings separated by “%0a” of (if (exists first “000000ff00” of it) then hexadecimal string (first 24 of following texts of first “000000ff00” of it ) else “n/a”), (hexadecimal integer (first 2 of following text of position 32 of it )/4) as string & “/” & (1990+(hexadecimal integer (first 2 of following text of position 34 of it ))) as string) of (values “EDID” of keys ((“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum” & it & “\Device Parameters”) of (string values of selects “PNPDeviceID from Win32_DesktopMonitor” of wmi) ) of registry as string)

A: DELL E170S , M875N96J084S, 6/2009

A: DELL E170S , M875N96J084S, 6/2009

(imported comment written by BenKus)

Maybe try this:

unique values of ((concatenation of substrings separated by “%0a” of (if (exists first “000000fc00” of it) then hexadecimal string (first 24 of following texts of first “000000fc00” of it ) else “n/a”), concatenation of substrings separated by “%0a” of (if (exists first “000000ff00” of it) then hexadecimal string (first 24 of following texts of first “000000ff00” of it ) else “n/a”), (hexadecimal integer (first 2 of following text of position 32 of it )/4) as string & “/” & (1990+(hexadecimal integer (first 2 of following text of position 34 of it ))) as string) of (values “EDID” of keys ((“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum” & it & “\Device Parameters”) of (string values of selects “PNPDeviceID from Win32_DesktopMonitor” of wmi) ) of registry as string) as string)

Ben

(imported comment written by mdahitule91)

Thanks Ben,

It is working as expected.

(imported comment written by SystemAdmin)

I’ve got this property in my BigFix environment and servers report back as an error of “Singular expression refers to non existant object”. I know this is because they likely don’t have a monitor attached. Is there a way to make this statement put a nice elegant N/A if no data is returned? The servers in question are Server 2008 and 2003.

(imported comment written by BenKus)

Hmm… It might be that you have a monitor that doesn’t have a date… Try:

q: unique values of (((concatenation of substrings separated by “%0a” of hexadecimal string (first 24 of following texts of first “000000fc00” of it ) ) | “n/a”, (concatenation of substrings separated by “%0a” of (hexadecimal string (first 24 of following texts of first “000000ff00” of it ))) | “n/a”, ((hexadecimal integer (first 2 of following text of position 32 of it )/4) as string & “/” & (1990+(hexadecimal integer (first 2 of following text of position 34 of it ))) as string) | “n/a”) of (values “EDID” of keys ((“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum” & it & “\Device Parameters”) of (string values of selects “PNPDeviceID from Win32_DesktopMonitor” of wmi) ) of registry as string) as string)

Ben

(imported comment written by BenKus)

Noah points out that I am using the “|”, which is only available in version 8.0 and higher so I should note it here…

Ben