Free Space/Total Space from volumes that don't have a specified DeviceID

(imported topic written by SystemAdmin)

I am trying to create two separate relevance snippets that will give me:

  1. The sum of total space on disk drives that do not have the Device ID 806e6f6e6963

  2. The sum of free space on disk drives that do not have the Device ID 806e6f6e6963

I can get a boolean response for the device ID by using:

(it as lowercase does not contain 
"806e6f6e6963") of (string values of selects (
"DeviceID from Win32_volume")  of WMI)

I cannot however, seem to append it do anything resembling this:

sum of (free spaces of drives) /1024/1024

or

sum of (total spaces of drives) /1024/1024

In other words, I’d like it to go something like this:

sum of (free spaces of drives) /1024/1024 whose (it as lowercase does not contain 
"806e6f6e6963") of (string values of selects (
"DeviceID from Win32_volume")  of WMI)

Any help merging these snippets would be greatly appreciated.

(imported comment written by Lee Wei)

You can try the following:

  1. The sum of total space on disk drives that do not have the Device ID 806e6f6e6963

    (it/1024/1024) of sum of (it as integer) of string values of properties
    "capacity" of select objects
    "* from win32_volume where not deviceid like ‘%25806e6f6e6963%25’" of wmi

  2. The sum of free space on disk drives that do not have the Device ID 806e6f6e6963

    (it/1024/1024) of sum of (it as integer) of string values of properties
    "freespace" of select objects
    "* from win32_volume where not deviceid like ‘%25806e6f6e6963%25’" of wmi

Note that percent 25 (%25) is the escape character for the percent sign for Relevance.

Lee Wei

(imported comment written by SystemAdmin)

Thanks Lee!