Get-SCVMHostGroup
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 Virtual Machine Manager (VMM) database.
For more information about host groups, type Get-Help New-VMHostGroup -detailed
.
Parameters
-ID<Guid]>
Specifies the numerical identifier as a globally unique identifier (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 |
ParentVMHostGroup |
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
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
Example 1: Get all host groups at the specified path
This command gets the host groups located at host path All Hosts\HostGroup01, and then displays information about these host groups to the user.
PS C:\> Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup01" }
Example 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