Starting with PowerShell v3.0, Microsoft has introduced Get-Cim* commands that make this easier than the ugliness of the Get-WmiObject ASSOCIATORS request method:
Get-CimInstance -Class Win32_DiskDrive -Filter 'InterfaceType = "USB"' -KeyOnly | Get-CimAssociatedInstance -ResultClassName Win32_DiskPartition -KeyOnly | Get-CimAssociatedInstance -ResultClassName Win32_LogicalDisk | Format-List *
Or:
Get-CimInstance -Class Win32_DiskDrive -Filter 'InterfaceType = "USB"' -KeyOnly | Get-CimAssociatedInstance -Association Win32_DiskDriveToDiskPartition -KeyOnly | Get-CimAssociatedInstance -Association Win32_LogicalDiskToPartition | Format-List *
The above commands are equivalent.
source share