Where do you want the data to end up?
If you want it in a report, then session relevance is your path forward.
If this is a property you would like to populate in BigFix inventory, then I think you will benefit from taking the client relevance path and perhaps if you wish, you could utilize a _BESClient_DeviceTypeOverride, possibly more elegant…
Perhaps something in an action script like:
setting "_BESClient_DeviceTypeOverride"="Desktop" on "{now}" for client
This relevance has been helpful to me in the past:
(if(it starts with “Mac OS X”)then(if(it contains “Server”)then “Server” else (if(((exists key whose(it as string as lowercase contains “battery”) of entries of dictionaries of nodes of it) OR (exists node “AppleACPIPlatformExpert/SMB0/AppleECSMBusController/AppleSmartBatteryManager” of service plane of iokit registry)of it)of service plane of iokit registry)then “Laptop” else “Desktop”))else (if(it starts with “Win”)then if (string value of selects “Model from Win32_ComputerSystem” of wmi) as lowercase contains “Virtual” as lowercase as string AND (value “ProductType” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions” of registry = “WinNT”) then “Desktop” else if (string value of selects “Model from Win32_ComputerSystem” of wmi) as lowercase contains “Virtual” as lowercase as string AND (value “ProductType” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions” of registry != “WinNT”) then “Server” else (if(it as lowercase contains “mobile”)then “Mobile” else(if(it = “Win95” OR it = “Win98” OR it = “WinME”)then “Desktop” else(if(nt workstation product type != product type of operating system)then “Server” else(if ((exists active device whose((class of it as lowercase = “battery” OR class of it as lowercase = “system”) AND service key value name of it as lowercase = “compbatt”)) AND (exists active device whose(class of it as lowercase = “battery” AND service key value name of it as lowercase = “cmbatt”))) then “Laptop” else “Desktop” ))))else(if (it contains “Linux” OR it contains “AIX” OR it contains “Sun” OR it contains “HP-UX” OR it contains “VMware”) then (“Server”) else(if((it contains “ios” OR it contains “android” OR it contains “ipad” OR it contains “iphone” OR it contains “ipod” OR it contains “smartphone” OR it contains “msft-” OR it contains “nokia” OR it contains “palm” OR it contains “pocketpc” OR it contains “htc”)of(it as lowercase)) then “Mobile” else “Unknown”)))) of name of operating system
and altogether:
setting "_BESClient_DeviceTypeOverride"="{(if(it starts with “Mac OS X”)then(if(it contains “Server”)then “Server” else (if(((exists key whose(it as string as lowercase contains “battery”) of entries of dictionaries of nodes of it) OR (exists node “AppleACPIPlatformExpert/SMB0/AppleECSMBusController/AppleSmartBatteryManager” of service plane of iokit registry)of it)of service plane of iokit registry)then “Laptop” else “Desktop”))else (if(it starts with “Win”)then if (string value of selects “Model from Win32_ComputerSystem” of wmi) as lowercase contains “Virtual” as lowercase as string AND (value “ProductType” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions” of registry = “WinNT”) then “Desktop” else if (string value of selects “Model from Win32_ComputerSystem” of wmi) as lowercase contains “Virtual” as lowercase as string AND (value “ProductType” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions” of registry != “WinNT”) then “Server” else (if(it as lowercase contains “mobile”)then “Mobile” else(if(it = “Win95” OR it = “Win98” OR it = “WinME”)then “Desktop” else(if(nt workstation product type != product type of operating system)then “Server” else(if ((exists active device whose((class of it as lowercase = “battery” OR class of it as lowercase = “system”) AND service key value name of it as lowercase = “compbatt”)) AND (exists active device whose(class of it as lowercase = “battery” AND service key value name of it as lowercase = “cmbatt”))) then “Laptop” else “Desktop” ))))else(if (it contains “Linux” OR it contains “AIX” OR it contains “Sun” OR it contains “HP-UX” OR it contains “VMware”) then (“Server”) else(if((it contains “ios” OR it contains “android” OR it contains “ipad” OR it contains “iphone” OR it contains “ipod” OR it contains “smartphone” OR it contains “msft-” OR it contains “nokia” OR it contains “palm” OR it contains “pocketpc” OR it contains “htc”)of(it as lowercase)) then “Mobile” else “Unknown”)))) of name of operating system}" on "{now}" for client
-jgo
relevance taken from here: