PowerCLI Reference

Get-VsanDisk

Synopsis

This cmdlet retrieves the host disks that belong to a vSAN 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 vSAN 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 vSAN 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 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".


Copyright © VMware, Inc. All rights reserved.