Get-DrsClusterGroup

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

Syntax

[[-Cluster]  <Cluster[]>]
[-Name  <String[]>]
[-Server  <VIServer[]>]
[-Type  <DrsClusterGroupType>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional
Cluster
Cluster[] 1
  • wildcards
  • pipeline
  • Specifies the clusters for which you want to retrieve the DRS cluster groups.
    optional
    Name
    String[] named
  • wildcards
  • Specifies the names of the DRS cluster groups you want to retrieve.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.
    optional
    Type
    DrsClusterGroupType named Specifies the type of DRS cluster groups you want to retrieve. This parameter accepts VMGroup, VMHostGroup, and All values.

    [[-VM]  <VirtualMachine[]>]
    [-Name  <String[]>]
    [-Server  <VIServer[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    optional
    VM
    VirtualMachine[] 1
  • wildcards
  • pipeline
  • Specifies the virtual machines for which you want to retrieve DRS cluster groups.
    optional
    Name
    String[] named
  • wildcards
  • Specifies the names of the DRS cluster groups you want to retrieve.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.

    [[-VMHost]  <VMHost[]>]
    [-Name  <String[]>]
    [-Server  <VIServer[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    optional
    VMHost
    VMHost[] 1
  • wildcards
  • pipeline
  • Specifies the VM hosts for which you want to retrieve DRS cluster groups.
    optional
    Name
    String[] named
  • wildcards
  • Specifies the names of the DRS cluster groups you want to retrieve.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null 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.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Cluster.DrsRule

    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.

    Related Commands

    Feedback

    Was this page helpful?