vSphere PowerCLI Reference

Get-VsanDisk

Synopsis

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

Syntax

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

Related Commands

Online version
New-VsanDisk
Remove-VsanDisk

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
CanonicalNameString[]Specifies the canonical names of the retrieved disks.falsefalse
IdString[]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.
truefalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
VMHostVMHost[]Specifies the hosts that the retrieved disks are attached to.truetrue (ByValue)
VsanDiskGroupVsanDiskGroup[]Specifies the Virtual SAN disk groups that the disks are part of.falsetrue (ByValue)

Return Type

Zero or more VsanDisk objects

Notes

Works only with vCenter Server 5.5 or later.

Examples

-------------- Example 1 --------------

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

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

-------------- Example 2 --------------

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

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

-------------- Example 3 --------------

Get-VsanDisk -Id "MyVsanDiskId"

Retrieves the Virtual SAN disk with ID "MyVsanDiskId".


Copyright © VMware, Inc. All rights reserved.