New-VMGroup

New-VMGroup

Creates a virtual machine group.

Syntax

Parameter Set: Default
New-VMGroup [-Name] <String> [-GroupType] <GroupType> {VMCollectionType | ManagementCollectionType} [[-Id] <Guid> ] [-CimSession <CimSession[]> ] [-ComputerName <String[]> ] [-Credential <PSCredential[]> ] [ <CommonParameters>]

Detaillierte Beschreibung

The New-VMGroup cmdlet creates a virtual machine group.

Parameter

-CimSession<CimSession[]>

Das Cmdlet wird in einer Remotesitzung oder auf einem Remotecomputer ausgeführt. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, wie z. B. die Ausgabe eines New-CimSession oder Get-CimSession-Cmdlets. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-ComputerName<String[]>

Specifies one or more Hyper-V hosts that run this cmdlet. NetBIOS names, IP addresses, and fully qualified domain names are allowable. The default is the local computer. Use localhost or a dot (.) to specify the local computer explicitly.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Credential<PSCredential[]>

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-GroupType<GroupType>

Specifies the type of group that this cmdlet creates. Die zulässigen Werte für diesen Parameter sind: ManagementCollectionType and VMCollectionType.

Aliase

none

Erforderlich?

true

Position?

2

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Id<Guid>

Specifies the unique ID of the group that this cmdlet creates.

Aliase

none

Erforderlich?

false

Position?

3

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-Name<String>

Specifies the name for the group that this cmdlet creates.

Aliase

none

Erforderlich?

true

Position?

1

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Eingaben

Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.

Ausgaben

Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.

  • Microsoft.HyperV.PowerShell.VMGroup

Beispiele

Example 1: Create a group to contain virtual machines

This command creates a virtual machine group named CollectionGroup07 of type VMCollectionType. This group can contain collections of virtual machines.

PS C:\> New-VMGroup -Name "CollectionGroup07" -GroupType VMCollectionType 

Example 2: Create a group to contain groups of virtual machines

This command creates a virtual machine group named ManagementCollectionGroup03 of type ManagementCollectionType. This group can contain collections of other groups.

PS C:\> New-VMGroup -Name "ManagementCollectionGroup03" -GroupType ManagementCollectionType 

Verwandte Themen

Get-VMGroup

Remove-VMGroup

Rename-VMGroup