Let's take for example the following request:
ASSOCIATORS OF {Win32_DiskPartition.DeviceID="Disk #2, Partition #0"} WHERE AssocClass = Win32_LogicalDiskToPartition
It works fine and returns the corresponding list with (in my case) one logical disk, F:. However if I change the method of specifying the object in this query, for example, this way:
ASSOCIATORS OF {Win32_DiskPartition.DiskIndex=2} WHERE AssocClass = Win32_LogicalDiskToPartition
I get the "Invalid object path" error (in PowerShell). The field DiskIndex is definitely there (the request "SELECT * FROM Win32_DiskPartition WHERE DiskIndex=2" returns the one and only partition that resides on my disk #2), so what's wrong with such request? I also tried using some other fields of Win32_DiskPartition class, but none of them worked in the "ASSOCIATORS OF" request. Anywhere in the Internet (that is, where google sent me) there is no information about any restrictions on the ObjectPath. Moreover, I found one article where the author explicitly says:
This qualifier can be any property from the source WMI class
So, what's wrong with this request modification?