New-SCVMConfiguration
New-SCVMConfiguration
Creates a virtual machine configuration from a virtual machine template.
Syntax
Parameter Set: FromTemplateOnly
New-SCVMConfiguration -VMTemplate <Template> [-AvailabilitySetNames <List<String>> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: Cloud
New-SCVMConfiguration -Cloud <Cloud> -Name <String> -VMTemplate <Template> [-AvailabilitySetNames <List<String>> ] [-CapabilityProfile <CapabilityProfile> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: ComputerTier
New-SCVMConfiguration -ComputerTier <ComputerTier> [-AvailabilitySetNames <List<String>> ] [-ComputerName <String> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Parameter Set: VMHostGroup
New-SCVMConfiguration -Name <String> -VMHostGroup <HostGroup> -VMTemplate <Template> [-AvailabilitySetNames <List<String>> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [ <CommonParameters>]
Detailed 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.
Parameters
-AvailabilitySetNames<List<String>>
Specifies a list of availability set names.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CapabilityProfile<CapabilityProfile>
Specifies a capability profile object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Cloud<Cloud>
Specifies a private cloud object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ComputerName<String>
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.
NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ComputerTier<ComputerTier>
Specifies a computer tier object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CostCenter<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-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 |
-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? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
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 |
-VMHostGroup<HostGroup>
Specifies a virtual machine host group object or an array of host group objects.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMTemplate<Template>
Specifies a VMM template object used to create virtual machines.
Aliases |
none |
Required? |
true |
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.
- VMConfiguration
Notes
- Requires a VMM virtual machine template object, which can be obtained by using the Get-SCVMTemplate cmdlet.
Examples
1: Create a virtual machine configuration for placement of a virtual machine on a host group.
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.
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"