## 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
CanonicalName | String[] | Specifies the canonical names of the retrieved disks. | false | false
Id | String[] | 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. | 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 disks are attached to. | true | true (ByValue)
VsanDiskGroup | VsanDiskGroup[] | Specifies the vSAN disk groups that the disks are part of. | false | true (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.