New-SCVMConfiguration

Creates a virtual machine configuration from a virtual machine template.

Syntax

New-SCVMConfiguration [-AvailabilitySetNames <System.Collections.Generic.List`1[System.String]>]
 [-CapabilityProfile <CapabilityProfile>] -Cloud <Cloud> [-CostCenter <String>] [-Description <String>]
 [-JobVariable <String>] -Name <String> [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-RunAsynchronously] -VMTemplate <Template> [<CommonParameters>]
New-SCVMConfiguration [-AvailabilitySetNames <System.Collections.Generic.List`1[System.String]>]
 [-ComputerName <String>] -ComputerTier <ComputerTier> [-CostCenter <String>] [-Description <String>]
 [-JobVariable <String>] [-Name <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-RunAsynchronously] [<CommonParameters>]
New-SCVMConfiguration [-AvailabilitySetNames <System.Collections.Generic.List`1[System.String]>]
 [-CostCenter <String>] [-Description <String>] [-JobVariable <String>] [-Name <String>]
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RunAsynchronously]
 -VMTemplate <Template> [<CommonParameters>]
New-SCVMConfiguration [-AvailabilitySetNames <System.Collections.Generic.List`1[System.String]>]
 [-CostCenter <String>] [-Description <String>] [-JobVariable <String>] -Name <String>
 [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>] [-PROTipID <Guid>] [-RunAsynchronously]
 -VMHostGroup <HostGroup> -VMTemplate <Template> [<CommonParameters>]

Description

The New-SCVMConfiguration cmdlet creates a virtual machine configuration from a virtual machine template. The virtual machine configuration is used to specify instance-specific values to use when deploying the virtual machine configuration.

Examples

Example 1: Create a virtual machine configuration for placement of a virtual machine on a host group

PS C:\> $HostGroup = Get-SCVMHostGroup -Name "Production"
PS C:\> $VMTemplate = Get-SCVMTemplate | where {$_.Name -eq "VMTemplate01"}
PS C:\> $VMConfig = New-SCVMConfiguration -VMTemplate $VMTemplate -VMHostGroup $HostGroup -CostCenter 1234 -Name "VMConfig01"

The first command gets the host group object named Production and stores the object in the $HostGroup variable.

The second command gets all virtual machine template objects, selects the template named VMTemplate01 and then stores the object in the $VMTemplate variable.

The last command creates a virtual machine configuration named VMConfig01 for the virtual machine template stored in $VMTemplate for deployment on the host group stored in $HostGroup, specifying a cost center value of 1234.

Parameters

-AvailabilitySetNames

Specifies a list of availability set names.

Type:System.Collections.Generic.List`1[System.String]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CapabilityProfile

Specifies a capability profile object.

Type:CapabilityProfile
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Cloud

Specifies a private cloud object.

Type:Cloud
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ComputerName

Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are:

- FQDN

  • IPv4 address
  • IPv6 address
  • NetBIOS name

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

Specifies a computer tier object.

Type:ComputerTier
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CostCenter

Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines (or resources allocated to virtual machines) to make use of in your billing system.

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

Specifies a description for the virtual machine configuration.

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

Specifies the name of a Virtual Machine Manager (VMM) object.

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

Specifies the name of a user. This cmdlet sets the on behalf of user as the user that this parameter specifies.

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

Specifies a user role. This cmdlet sets the on behalf of user role as the user role that this parameter specifies. To obtain a user role object, use the Get-SCUserRole cmdlet.

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMHostGroup

Specifies a virtual machine host group object or an array of host group objects.

Type:HostGroup
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMTemplate

Specifies a VMM template object used to create virtual machines.

Type:Template
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

VMConfiguration

This cmdlet returns a **VMConfiguration** object.

Notes

* Requires a VMM virtual machine template object, which you can obtain by using the **Get-SCVMTemplate** cmdlet.