PowerCLI Reference

Get-VsanObject

Synopsis

This cmdlet retrieves vSAN objects based on the specified filters.

Syntax

Get-VsanObject [[-Cluster] <Cluster[]>] [-Type <VsanObjectType[]>] [-VM <VirtualMachine[]>] [-VsanDisk <VsanDisk[]>] [-Server <VIServer[]>] [<CommonParameters>]

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

Related Commands

Online Version

Detailed Description

This cmdlet retrieves vSAN objects based on the specified filters.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ClusterCluster[]Specifies the clusters from which to retrieve the vSAN objects.falseTrue (ByValue)
IdString[]Specifies the vSAN UUID of that vSAN objects that you want to retrieve.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 the Connect-VIServer cmdlet.falseFalse
TypeVsanObjectType[]Specifies the types of the vSAN objects to be retrieved.falseFalse
VMVirtualMachine[]Specifies the virtual machines to which the vSAN objects you want to retrieve belong.falseFalse
VsanDiskVsanDisk[]Specifies the vSAN disk on which the vSAN objects you want to retrieve reside.falseFalse

Return Type

Zero or more vSAN objects

Notes

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.


Copyright © VMware, Inc. All rights reserved.