Get-SCVMHostGroup

Gets a host group object from the VMM database.

Syntax

Get-SCVMHostGroup
   [-VMMServer <ServerConnection>]
   [[-Name] <String>]
   [<CommonParameters>]
Get-SCVMHostGroup
   [-VMMServer <ServerConnection>]
   -ID <Guid>
   [[-Name] <String>]
   [<CommonParameters>]
Get-SCVMHostGroup
   -ParentHostGroup <HostGroup>
   [[-Name] <String>]
   [<CommonParameters>]

Description

The Get-SCVMHostGroup cmdlet gets one or more host group objects from the Virtual Machine Manager (VMM) database.

For more information about host groups, type Get-Help New-VMHostGroup -Detailed.

Examples

Example 1: Get all host groups at the specified path

PS C:\> Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup01" }

This command gets the host groups located at host path All Hosts\HostGroup01 and displays information about these host groups.

Example 2: Display the name and path properties for all host groups

PS C:\> Get-SCVMHostGroup -VMMServer "VMMServer01.Contoso.com" | select -Property Name,Path

This command gets all host group objects from VMMServer01, selects the name and host group path properties, and displays those properties.

Parameters

-ID

Specifies the numerical identifier as a globally unique identifier, or GUID, for a specific object.

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of a VMM object.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ParentHostGroup

Specifies the parent host group that contains one or more hosts, host groups, or host clusters.

Type:HostGroup
Aliases:ParentVMHostGroup
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False