Syntax
Get-DrsClusterGroup [[-Name] <String[]>] [[-Cluster] <Cluster[]>] [-Server <VIServer[]>] [-Type <DrsClusterGroupType>] [<CommonParameters>]Related Commands
Online VersionDetailed 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 objectsNotes
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.