I am trying to find the numbers of each hardware model in the environment.
I was trying to have a custom report for this but am not able to query the hardware model.
I have this but HarwareModel needs to be replaced:
( html “<table border=1 style=%22border-collapse; collapse; border: medium none; %22>” &
html (“
Hardware Model
Number of Clients
”) & it & html “”
) of concatenations of
trs of (td of it & td “align=right” of (multiplicity of it as string)) of
unique values of HardwareModel as string
I wanted a custom report of the number of devices per model & CPU combined.
I now have them on CPU as below:
<?relevance
(multiplicity of it, it) of unique values of values of results from (bes property "CPU") of bes computers
?>
But still unable to query the hardware model (we have a property “HardwareModel” that queries wmi to retrieve the model but I can not find a way to query this from the report as for the CPU one)
The session relevance would be something like this:
(multiplicity of it, it) of unique values of (value of results from (bes property "HardwareModel") of it & " - " & value of results from (bes property "CPU") of it) of bes computers
This is missing any relevance to handle edge cases / non existence.
unfortunately, it seems that unique values of can not be used with the tuple of CPU & Hardware.
If I input
((value of results from (bes property “HardwareModel”) of it & " - " & value of results from (bes property “CPU”) of it) of bes computers as string)
i receive as expected, pairs of model & CPU for each device.
If i add unique values of ((value of results from (bes property “HardwareModel”) of it & " - " & value of results from (bes property “CPU”) of it) of bes computers as string)
I receive “Singular expression refers to nonexistent object” error
Anyways, since this report was time sensitive, I found another way to extract the needed data using excel functions.
I will keep trying to find a way to solve this from custom reports as it will be much easier if something similar is needed in the future.