## PowerCLI Reference

# Get-DatastoreCluster

## Synopsis

This cmdlet retrieves datastore clusters.

Syntax

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

Related Commands

Online version
New-DatastoreCluster
Remove-DatastoreCluster
Set-DatastoreCluster

Detailed Description

This cmdlet retrieves datastore clusters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String[] | Specifies the names of the datastore clusters you want to retrieve. | false | false
RelatedObject | DatastoreClusterRelatedObjectBase[] | Specifies objects to retrieve one or more DatastoreCluster objects that are related to them. This parameter accepts OMResource? objects. | true | true (ByValue)
Datastore | Datastore[] | Filters the datastore clusters by the datastores located in them. | false | true (ByValue)
Id | String[] | Specifies the IDs of the datastore clusters you want to retrieve. 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. | false | false
Location | VIContainer[] | Specifies the datacenters and folders from which you want to retrieve datastore clusters. | false | true (ByValue)
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
Tag | Tag[] | Returns only the datastore clusters that are associated with any of the specified tags. | false | false
Template | Template[] | Filters the datastore clusters by the virtual machine templates located in them. | false | true (ByValue)
VM | VirtualMachine[] | Filters the datastore clusters by the virtual machines located in them. | false | true (ByValue)

Return Type

Zero or more DatastoreCluster objects

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 © VMware, Inc. All rights reserved.