Get PCSystemType from wmi ?

Hi
this relevance is working and return value is Desktop

tuple string items ( unique values of integer values of (selects "PCSystemType from Win32_ComputerSystem" of wmis) ) of "Unspecified, Desktop, Mobile, Workstation, Enterprise Server, SOHO Server, Appliance PC, Performance Server, Slate, Maximum"

but when i try to check the value
(tuple string items ( unique values of integer values of (selects “PCSystemType from Win32_ComputerSystem” of wmis) ) of “Unspecified, Desktop, Mobile, Workstation, Enterprise Server, SOHO Server, Appliance PC, Performance Server, Slate, Maximum”) = “Desktop”

i got error "the left operand of ‘=’ must be singular

!

I just need to confirm this workstation is desktop , laptop or server

1 Like

@abayoumy

Pretty nice moves with the Tuple string items. I have not seen that trick to do an integer lookup vs a list before.

I think you just need an existence check to solve.

q: tuple string items ( unique values of integer values of (selects "PCSystemType from Win32_ComputerSystem" of wmis) ) of "Unspecified, Desktop, Mobile, Workstation, Enterprise Server, SOHO Server, Appliance PC, Performance Server, Slate, Maximum"
A: Mobile
T: 30.728 ms
I: plural string

q: exists (tuple string items ( unique values of integer values of (selects "PCSystemType from Win32_ComputerSystem" of wmis) ) of "Unspecified, Desktop, Mobile, Workstation, Enterprise Server, SOHO Server, Appliance PC, Performance Server, Slate, Maximum") whose (it = "Desktop")
A: False
T: 15.435 ms
I: singular Boolean

And if you wanted to check for more than one:

q: exists (tuple string items ( unique values of integer values of (selects "PCSystemType from Win32_ComputerSystem" of wmis) ) of "Unspecified, Desktop, Mobile, Workstation, Enterprise Server, SOHO Server, Appliance PC, Performance Server, Slate, Maximum") whose (it = "Desktop" OR it = "Server" OR it = "Mobile")
A: True
2 Likes

thx
source https://bigfix.me/cdb/relevance/3002561