New-SCVMHostGroup

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

Syntax

New-SCVMHostGroup
   [-VMMServer <ServerConnection>]
   [-Name] <String>
   [-Description <String>]
   [-ParentHostGroup <HostGroup>]
   [-EnableUnencryptedFileTransfer <Boolean>]
   [-InheritNetworkSettings <Boolean>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

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.

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

Examples

Example 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.

Example 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.

Parameters

-Description

Specifies a description for the host group.

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

-EnableUnencryptedFileTransfer

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.
Type:Boolean
Aliases:AllowUnencryptedTransfers
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InheritNetworkSettings

Indicates, when set to $True, that the network settings for a host group will have the same values as those specified for its parent.

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

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

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

-Name

Specifies the name of a VMM object.

Type:String
Position:0
Default value:None
Required:True
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:False
Accept pipeline input:True
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

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

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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

Outputs

HostGroup

This cmdlet returns a HostGroup object.