WQL ASSOCIATORS OF Queries in PowerShell: From WMIC to CimCmdlets
The ASSOCIATORS OF statement in SQL for WMI (WQL) retrieves objects related to a specified source instance, where the source and related objects belong to different classes and are connected through an association class . For example, Win32_LogicalDiskToPartition is an association class that links Win32_DiskPartition and Win32_LogicalDisk . Using this association, you can list the disk partitions related to a specific logical disk (or vice versa). The object paths used to identify the source instances include the DeviceID property, which is intuitive and easy to understand. For instance, DeviceID values are in the form of C: for a logical disk or volume, or Disk #1, Partition #1 for a disk partition, making them more human-readable. In contrast, the Storage Management Provider (SMP) equivalent classes — MSFT_Partition , MSFT_Volume , and their association class MSFT_PartitionToVolume — do not expose user-friendly object path values. These ide...