Multiple results in the console

(imported topic written by mallika91)

I am collecting disk drive Info from the Bigfix , but the result it showing multiple results. Could you please advise and modify the below query to show the actual result nstead on the console .

if (exists wmi) then (string value of property “caption” of it, (string value of property “size” of it as integer / 1024/1024/1024) as string & " GB") of (select objects “Caption, size from Win32_DiskDrive” of wmi) else nothings

Thanks & Regards

Mallikarjun

(imported comment written by Lee Wei)

Mallika,

Please see if the following is useful:

//Original statement

q: if (exists wmi) then (string value of property “caption” of it, (string value of property “size” of it as integer / 1024/1024/1024) as string & " GB") of (select objects “Caption, size from Win32_DiskDrive” of wmi) else nothings

A: ST9250410ASG, 232 GB

A: CBM USB 2.0 USB Device, 2 GB

q: if (exists wmi) then concatenation “; " of (string value of property “caption” of it & " - " & (string value of property “size” of it as integer / 1024/1024/1024) as string & " GB”) of (select objects “Caption, size from Win32_DiskDrive” of wmi) else nothings

A: ST9250410ASG - 232 GB; CBM USB 2.0 USB Device - 2 GB

Lee Wei

(imported comment written by mallika91)

Its worked.

Thanks a lot Lee.

Mallikarjun

(imported comment written by mallika91)

Hi Lee,

We are using the following querry for IP and Mac address, it shows multiple results for most of compuetrs.

Could u please modify the following query.

IP:

addresses whose (it as string != “0.0.0.0”) of ip interfaces whose (loopback of it = false) of network

Mac address:

mac addresses of adapters of network

Thanks

Mallikarjun

(imported comment written by SystemAdmin)

Lee,

How do I take an analysis that is pulling this query as a property and get it into a report?

(name of it, path of it, (if (not exists entries of dacls of security descriptors of it) then “n/a” else ((trustee of it as string & “:” & (if ( read permission of it) then “R” else “”) &(if ( write permission of it) then “W” else “” )) of entries of dacls of security descriptors of it))) of network shares

We also see in the console and due to the sheer number of shares and users its not practical to use concatenation "; " of to append the results to one long string value. I would much prefer to get the results similar to the QnA tool

Servname

Share1\users and groups

Share2\users and groups

Share3\users

If there is no way to get this into a report then what I need is a way to pull all shares and the groups\users that have access to those shares\directories

Suggestions?