Get-XenVMGroup

Last published : Nov 12, 2026
Gets the VMGroup objects in the pool.

Syntax

Get-XenVMGroup [[-Ref] <XenRef[VM_group]>] [-BestEffort] [-SessionOpaqueRef <string>]
    [<CommonParameters>]
Get-XenVMGroup [-Uuid] <guid> [-BestEffort] [-SessionOpaqueRef <string>]
    [<CommonParameters>]
Get-XenVMGroup [-Name] <string> [-BestEffort] [-SessionOpaqueRef <string>]
    [<CommonParameters>]

Description

Retrieves the VMGroup objects in the pool. With no parameters the cmdlet returns the whole collection; use -Name, -Uuid or -Ref to select one.
VMGroup: A VM group.

Parameters

-BestEffort

If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
Attribute Value
Type SwitchParameter
Required False
Position Named
Accepts pipeline input False

-Name

The name of the VMGroup to operate on.
Attribute Value
Type string
Required True
Position 0
Accepts pipeline input True (ByPropertyName)
Aliases name_label

-Ref

The VMGroup object to operate on, specified by its opaque reference.
Attribute Value
Type XenRef[VM_group]
Required False
Position 0
Accepts pipeline input True (ByPropertyName)
Aliases opaque_ref

-SessionOpaqueRef

The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
Attribute Value
Type string
Required False
Position Named
Accepts pipeline input False

-Uuid

The UUID of the VMGroup to operate on.
Attribute Value
Type guid
Required True
Position 0
Accepts pipeline input True (ByPropertyName)

Inputs

  • XenRef[VM_group]
  • guid
  • string

Outputs

  • VM_group[]

Examples

Example 1: List every VMGroup

PS> Get-XenVMGroup
Retrieves every VMGroup object in the pool. With no parameters the cmdlet fetches the whole collection.

Example 2: List the members of a VM group

PS> (Get-XenVMGroup -Name "front end").VMs
The group record holds references to its members. Membership is set from the other side, with Set-XenVM -Groups.

Example 3: Retrieve one VMGroup by name

PS> Get-XenVMGroup -Name "Demo VMGroup"
Retrieves a single VMGroup. -Name matches on name\_label, which is not unique, so every match is operated on.