New-SCVMHostGroup
New-SCVMHostGroup
Creates a host group that can contain virtual machine host computers, other host groups, or host clusters.
Syntax
Parameter Set: Default
New-SCVMHostGroup [-Name] <String> [-Description <String> ] [-EnableUnencryptedFileTransfer <Boolean]> ] [-InheritNetworkSettings <Boolean]> ] [-JobVariable <String> ] [-ParentHostGroup <HostGroup> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Detailed 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 in these name/path pairs:
-- 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.
Parameters
-Description<String>
States a description for the specified object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EnableUnencryptedFileTransfer<Boolean]>
Indicates whether 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.
Aliases |
AllowUnencryptedTransfers |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-InheritNetworkSettings<Boolean]>
Indicates, when set to $True, that the network settings for a host group will have the same values as those specified for its parent.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
Aliases |
none |
Required? |
false |
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? |
true |
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? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
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.
- HostGroup
Examples
Example 1: Create a host group under the root host group
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.
PS C:\> New-SCVMHostGroup -VMMServer "VMMServer01.Contoso.com" -Name "HostGroup01"
Example 2: Create a host group under a specified parent host group
The first command gets the host group named HostGroup01 and then 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.
PS C:\> $ParentGroup = Get-SCVMHostGroup -Name "HostGroup01"
PS C:\> New-SCVMHostGroup -Name "ChildGroup01" -ParentHostGroup $ParentGroup