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

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specifies the names of the DRS cluster groups you want to retrieve.falsefalse
ClusterCluster[]Specifies the clusters for which you want to retrieve the DRS cluster groups.falsetrue (ByValue)
VMVirtualMachine[]Specifies the virtual machines for which you want to retrieve DRS cluster groups.falsetrue (ByValue)
VMHostVMHost[]Specifies the VM hosts for which you want to retrieve DRS cluster groups.falsetrue (ByValue)
ServerVIServer[]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.falsefalse
TypeDrsClusterGroupTypeSpecifies the type of DRS cluster groups you want to retrieve. This parameter accepts VMGroup, VMHostGroup, and All values.falsefalse

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.