vSphere PowerCLI Reference

Get-VsanDiskGroup

Synopsis

This cmdlet retrieves Virtual SAN disk groups.

Syntax

Get-VsanDiskGroup [-Cluster <Cluster[]>] [[-Name] <String[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VsanDiskGroup -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]
Get-VsanDiskGroup [-DiskCanonicalName <String[]>] -VMHost <VMHost[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VsanDiskGroup
Remove-VsanDiskGroup

Detailed Description

This cmdlet retrieves Virtual SAN disk groups in a cluster or a host, by ID, name, or the canonical name of a disk within the disk group.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specifies the name of the Virtual SAN disk group you want to retrieve.falsefalse
ClusterCluster[]Specifies the clusters that the retrieved groups are on.falsetrue (ByValue)
DiskCanonicalNameString[]Specifies the canonical names of disks that are part of the retrieved groups.falsefalse
IdString[]Specifies the IDs of disks that are part of the retrieved groups.

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 groups are on.truetrue (ByValue)

Return Type

Zero or more VsanDiskGroup objects

Notes

Works only with vCenter Server 5.5 or later.

Examples

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

Get-VsanDiskGroup -DiskCanonicalName "DiskCanonicalName" -VMHost $vmHost

Retrieves all Virtual SAN disk groups that contain a disk with canonical name "DiskCanonicalName" from the $vmHost virtual machine host.

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

Get-VsanDiskGroup -Name "MyVsanDiskGroup" -Cluster $cluster

Retrieves all Virtual SAN disk groups named "MyVsanDiskGroup" from the $cluster cluster.

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

Get-VsanDiskGroup -Id "MyVsanDiskGroupId"

Retrieves the Virtual SAN disk group with ID "MyVsanDiskGroupId".


Copyright © VMware, Inc. All rights reserved.