## PowerCLI Reference

# Get-DrsClusterGroup

## Synopsis

This cmdlet retrieves DRS cluster groups for the specified cluster, VM, or VM host.

Syntax

Get-DrsClusterGroup [[-Name] <String[]>] [[-Cluster] <Cluster[]>] [-Type <DrsClusterGroupType>] [-Server <VIServer[]>] [<CommonParameters>]
Get-DrsClusterGroup [[-Name] <String[]>] [[-VM] <VirtualMachine[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-DrsClusterGroup [[-Name] <String[]>] [[-VMHost] <VMHost[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-DrsClusterGroup
Remove-DrsClusterGroup
Set-DrsClusterGroup

Detailed Description

This cmdlet retrieves DRS cluster groups for the specified cluster, VM, or VM host.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String[] | Specifies the names of the DRS cluster groups you want to retrieve. | false | false
Cluster | Cluster[] | Specifies the clusters for which you want to retrieve the DRS cluster groups. | false | true (ByValue)
VM | VirtualMachine[] | Specifies the virtual machines for which you want to retrieve DRS cluster groups. | false | true (ByValue)
VMHost | VMHost[] | Specifies the VM hosts for which you want to retrieve DRS cluster groups. | 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
Type | DrsClusterGroupType | Specifies the type of DRS cluster groups you want to retrieve. This parameter accepts VMGroup, VMHostGroup, and All values. | false | false

Return Type

Zero or more DrsClusterGroup objects

Notes

Examples

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

    Get-DrsClusterGroup -VM $vm1, $vm2

Retrieves the corresponding DRS cluster groups associated with any of the virtual machines from the specified list.

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

    Get-DrsClusterGroup -Cluster $cluster -Type VMHostGroup

Retrieves all VM host groups within the specified cluster.

Copyright © VMware, Inc. All rights reserved.