Get-VsanObject Command | Vmware PowerCLI Reference

Get-VsanObject

This cmdlet retrieves vSAN objects based on the specified filters.

Syntax

Get-VsanObject
-Id < String[] >
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Id String[] named
Specifies the vSAN UUID of that vSAN objects that you want to retrieve.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
Get-VsanObject
[-Cluster < Cluster[] > ]
[-Server < VIServer[] > ]
[-Type < VsanObjectType[] > ]
[-VM < VirtualMachine[] > ]
[-VsanDisk < VsanDisk[] > ]
[-VsanStoragePoolDisk < VsanStoragePoolDisk[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Cluster Cluster[] named
  • pipeline
  • wildcards
Specifies the clusters from which to retrieve the vSAN objects.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
optional Type VsanObjectType[] named
Specifies the types of the vSAN objects to be retrieved.
optional VM VirtualMachine[] named
  • wildcards
Specifies the virtual machines to which the vSAN objects you want to retrieve belong.
optional VsanDisk VsanDisk[] named
Specifies the vSAN disk on which the vSAN objects you want to retrieve reside.
optional VsanStoragePoolDisk VsanStoragePoolDisk[] named
Specifies the vSAN storage pool disk on which the vSAN objects you want to retrieve reside. The disks are managed as a vSAN storage pool disk in a vSAN ESA enabled cluster. This parameter is available starting from vSphere8.0.

Output

VMware.VimAutomation.Storage.Types.V1.Vsan.VsanObject

Examples

Example 1

Get-VsanObject -Cluster $clusters

Retrieves information of all vSAN objects from the specified clusters.

Example 2

Get-VsanObject -Cluster $clusters -VM $vms

Retrieves information of the vSAN objects in the specified clusters. The vSAN objects should associate with the specified virtual machines.

Example 3

Get-VsanObject -Cluster $clusters -VsanDisk $disks

Retrieves information of the vSAN objects in the specified clusters. The vSAN objects should reside in the specified vSAN disks.

Example 4

Get-VsanObject -Cluster $clusters -VM $vms -type VDisk

Retrieves information of the VMDK type vSAN objects in the specified clusters. The vSAN objects should associate with the specified virtual machines.

Example 5

Get-VsanObject -VsanStoragePoolDisk $vsanstoragepooldisks

Retrieves information of the vSAN objects in the specified vSAN storage pool disks. The vSAN objects must reside in the specified vSAN storage pool disks. Note: You can use the VsanStoragePoolDisk entity type starting from vSphere 8.0.

Related Commands

VsanObject

This cmdlet retrieves vSAN objects based on the specified filters.

VsanObjectToRepairQueue

This cmdlet puts a list of vSAN objects on a repair queue.