New-SCVMHostGroup

Creates a host group that can contain virtual machine host computers, other host groups, or host clusters.

Description

The New-SCVMHostGroup cmdlet creates a host group object that can contain host computers on which one or more virtual machines are deployed, other host groups, or host clusters.

System Center Virtual Machine Manager (VMM) provides a default parent host group called All Hosts, to which you can add child host groups. A new host group is empty until you move hosts into it or create one or more child host groups under it. Host groups are organized into a hierarchical and customizable tree structure. In the host group tree, the parent of a new host group is either the default root host group (All Hosts) or a user-created host group. 

A host group can be a parent container for any of the following:

- A host or set of hosts
- A host group or set of host groups, and hosts within those host groups
- A host cluster, and hosts (nodes) within that host cluster

Hosts contained in a host group have a host path property that shows the location of that host in the host group hierarchy, as illustrated in the following table:

Name  Path
----  ----
All Hosts   All Hosts
ChildHostGroup01		 All Hosts\ChildHostGroup01
ChildHostGroup02		 All Hosts\ChildHostGroup02
New Datacenter		All Hosts\New Datacenter
nested1	 All Hosts\New Datacenter\nested01
nested2	 All Hosts\New Datacenter\nested\nested02

For more information about New-SCVMHostGroup, type: "Get-Help New-SCVMHostGroup -online".

Parameters

Name

Required? true
Accept Pipeline Input? false
Position? 0
Specifies the name of a VMM object.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

EnableUnencryptedFileTransfer

Required? false
Accept Pipeline Input? false
Position? named
Indicates, when set to True, that network file transfers do not require encryption. Allowing unencrypted network file transfers can improve performance if neither the source host nor the destination host requires encryption. 

Use this parameter to: 
- Enable unencrypted file transfers into, or out of, the library.
- Enable unencrypted file transfers into, out of, or within a host group.

InheritNetworkSettings

Required? false
Accept Pipeline Input? false
Position? named
Specifies, when set to True, that the network settings for a host group will have the same values as those specified for its parent.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

ParentHostGroup

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies the parent host group that contains one or more hosts, host groups, or host clusters.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Create a host group under the root host group.
PS C:\> New-SCVMHostGroup -VMMServer "VMMServer01.Contoso.com" -Name "HostGroup01"
This command creates a host group named HostGroup01 on VMMServer01 in the Contoso.com domain. By default, VMM places this host group under the root host group, which is called All Hosts.
2: Create a host group under a specified parent host group.
PS C:\> $ParentGroup = Get-SCVMHostGroup -Name "HostGroup01" 
PS C:\> New-SCVMHostGroup -Name "ChildGroup01" -ParentHostGroup $ParentGroup
The first command gets the host group named HostGroup01 and stores it in the $ParentGroup variable. 

The second command creates a host group named ChildGroup01 and places it under the parent host group stored in the $ParentGroup variable.

See Also