Get-VsanDisk Command | Vmware PowerCLI Reference

Get-VsanDisk

This cmdlet retrieves the host disks that belong to a vSAN disk group. The cmdlet retrieves both SSD and HDD types of disks.

Syntax

Get-VsanDisk
-VMHost < VMHost[] >
[-CanonicalName < String[] > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VMHost VMHost[] named
  • pipeline
  • wildcards
Specifies the hosts that the retrieved disks are attached to.
optional CanonicalName String[] named
Specifies the canonical names of the retrieved disks.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
Get-VsanDisk
-Id < String[] >
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Id String[] named
Specifies the IDs of the retrieved disks. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
Get-VsanDisk
[-CanonicalName < String[] > ]
[-Server < VIServer[] > ]
[-VsanDiskGroup < VsanDiskGroup[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional CanonicalName String[] named
Specifies the canonical names of the retrieved disks.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
optional VsanDiskGroup VsanDiskGroup[] named
  • pipeline
  • wildcards
Specifies the vSAN disk groups that the disks are part of.

Output

VMware.VimAutomation.Storage.Types.V1.Vsan.VsanDisk

Examples

Example 1

Get-VsanDisk -CanonicalName "DiskCanonicalName" -VMHost $vmHost

Retrieves all vSAN disks with canonical name "DiskCanonicalName" from the $vmHost virtual machine host.

Example 2

Get-VsanDisk -CanonicalName "DiskCanonicalName" -VsanDiskGroup $vsanDiskGroup

Retrieves all vSAN disks with canonical name "DiskCanonicalName" from the $vsanDiskGroup vSAN disk group.

Example 3

Get-VsanDisk -Id "MyVsanDiskId"

Retrieves the vSAN disk with ID "MyVsanDiskId".

Related Commands

VsanDisk

This cmdlet retrieves the host disks that belong to a vSAN disk group.

This cmdlet adds a host SCSI disk to a vSAN disk group.

This cmdlet removes the specified hard disks from the specified vSAN disk group.

VsanDiskGroup

This cmdlet retrieves vSAN disk groups.

This cmdlet creates a new vSAN disk group backed by the specified devices.

This cmdlet removes vSAN disk groups.