Sdílet prostřednictvím


New-SCVMHostGroup

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

Syntax

Default (Default)

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AllowUnencryptedTransfers

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of a VMM object.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ParentHostGroup

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

Parameter properties

Type:HostGroup
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ParentVMHostGroup

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

HostGroup

This cmdlet returns a HostGroup object.