You can pipe a VirtualDisk object to the VirtualDisk parameter. You can pipe a Partition object to the Partition parameter. You can pipe an iSCSISession object to the iSCSISession parameter. You can pipe an iSCSIConnection object to the iSCSIConnection parameter.
The Virtual Disk CIM object is exposed by the Get-VirtualDisk cmdlet.
It then passes the Disk objects in the pipeline to the Get-IscsiSession cmdlet, which gets the associated iSCSI sessions, and then pipes the output to the Format-Table cmdlet for simplified display. This example gets all disks attached via the iSCSI bus by piping the output of Get-Disk to the Where-Object cmdlet, and filtering by the iSCSI value of the Bustype property. Example 3: Get all USB disks PS C:\>Get-Disk | Where-Object -FilterScript | Example 2: Get a disk by disk number PS C:\>Get-Disk -Number 6 This example gets all disks visible to the operating system. Examples Example 1: Get all disks PS C:\>Get-Disk The Get-Disk cmdlet gets one or more Disk objects visible to the operating system, or optionally a filtered list. For more information, see Basic and Dynamic Disks. Dynamic disks can span multiple pieces of physical media, so they will not be returned by Get-Disk.
This cmdlet returns physical disk objects like basic disks and partitioned drive partitions.