I'm guessing here, but you might be able to just do this:
Get-IscsiTarget | Get-iSCSISession | Get-Disk -iSCSISession | Get-Partition | Get-Volume
Otherwise, the iSCSI documentation suggests something like this might get you a MSFT_Disk
from the MSFT_iSCSITarget
that Get-IscsiTarget
returns, and the Storage Management documentation suggests you can get to volumes from that.
Get-IscsiTarget |
Get-CimAssociatedInstance -Association MSFT_iSCSITargetToiSCSISession -Namespace 'root\microsoft\windows\storage' -KeyOnly |
Get-CimAssociatedInstance -Association MSFT_iSCSISessionToDisk -Namespace 'root\microsoft\windows\storage' -KeyOnly |
Get-CimAssociatedInstance -Association MSFT_DiskToPartition -Namespace 'root\microsoft\windows\storage' -KeyOnly |
Get-CimAssociatedInstance -Association MSFT_PartitionToVolume -Namespace 'root\microsoft\windows\storage'
That should return the MSFT_Volume
. I'm not 100% sure about the namespaces above.