Get-SCVMHostGroup
Applies To: System Center 2012 - Virtual Machine Manager
Get-SCVMHostGroup
Gets a host group object from the VMM database.
Syntax
Parameter Set: Connection
Get-SCVMHostGroup [[-Name] <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: ID
Get-SCVMHostGroup [[-Name] <String> ] -ID <Guid> [ <CommonParameters>]
Parameter Set: ParentHostGroup
Get-SCVMHostGroup [[-Name] <String> ] -ParentHostGroup <HostGroup> [ <CommonParameters>]
Detailed Description
The Get-SCVMHostGroup cmdlet gets one or more host group objects from the System Center Virtual Machine Manager (VMM) database.
For more information about host groups, type: "Get-Help New-VMHostGroup -detailed".
For more information about Get-SCVMHostGroup, type: "Get-Help Get-SCVMHostGroup -online".
Parameters
-ID<Guid>
Specifies the numerical identifier (as a globally unique identifier, or GUID) for a specific object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies the name of a VMM object.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ParentHostGroup<HostGroup>
Specifies the parent host group that contains one or more hosts, host groups, or host clusters.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
1: Get all host groups at the specified path.
This command gets the host groups located at host path "All Hosts\HostGroup01" and displays information about these host groups to the user.
PS C:\> Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup01" }
2: Display the name and path properties for all host groups.
This command gets all host group objects from VMMServer01, selects the name and host group path properties, and displays those properties to the user.
PS C:\> Get-SCVMHostGroup -VMMServer "VMMServer01.Contoso.com" | select -Property Name,Path