vSphere PowerCLI Reference

Get-DatastoreCluster

Synopsis

Retrieves datastore clusters.

Syntax

Get-DatastoreCluster [-Id <String[]>] [[-Name] <String[]>] [-Location <VIContainer[]>] [-VM <VirtualMachine[]>] [-Template <Template[]>] [-Datastore <Datastore[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-DatastoreCluster
Remove-DatastoreCluster
Set-DatastoreCluster

Detailed Description

Retrieves datastore clusters.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specify the names of the datastore clusters you want to retrieve.falsefalse
DatastoreDatastore[]Filter the datastore clusters by the datastores located in them.falsetrue (ByValue)
IdString[]Specify the IDs of the datastore clusters you want to retrieve.falsefalse
LocationVIContainer[]Specify the datacenters and folders from which you want to retrieve datastore clusters.falsetrue (ByValue)
ServerVIServer[]Specify the vSphere servers 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
TemplateTemplate[]Filter the datastore clusters by the virtual machine templates located in them.falsetrue (ByValue)
VMVirtualMachine[]Filter the datastore clusters by the virtual machines located in them.falsetrue (ByValue)

Return Type

DatastoreCluster[]

Notes

Examples

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

Get-DatastoreCluster

Retrieves all datastore clusters.

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

Get-DatastoreCluster -Name DatastoreCluster1

Retrieves a datastore cluster by name.

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

Get-VM -Name WebServerVM | Get-DatastoreCluster

Retrieves datastore clusters through filtering by virtual machine.


Copyright © 1998 - 2012 VMware, Inc. All rights reserved.