PowerCLI Reference

Get-VsanDisk

Synopsis

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

Syntax

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

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

Get-VsanDisk -Id <String[]> [-Server <VIServer[]>] [<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.