## PowerCLI Reference

# Get-VsanDiskGroup

## Synopsis

This cmdlet retrieves vSAN 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 vSAN disk groups in a cluster or a host, by ID, name, or the canonical name of a disk within the disk group.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String[] | Specifies the name of the vSAN disk group you want to retrieve. | false | false
Cluster | Cluster[] | Specifies the clusters that the retrieved groups are on. | false | true (ByValue)
DiskCanonicalName | String[] | Specifies the canonical names of disks that are part of the retrieved groups. | false | false
Id | String[] | 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. | true | false
Server | VIServer[] | 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. | false | false
VMHost | VMHost[] | Specifies the hosts that the retrieved groups are on. | true | true (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 vSAN 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 vSAN disk groups named "MyVsanDiskGroup" from the $cluster cluster.

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

    Get-VsanDiskGroup -Id "MyVsanDiskGroupId"

Retrieves the vSAN disk group with ID "MyVsanDiskGroupId".

Copyright © VMware, Inc. All rights reserved.