Add-SCComputerTierTemplate

Adds a computer tier template to a service template.

Syntax

Add-SCComputerTierTemplate
   [-Name] <String>
   [-Description <String>]
   [-InstanceMaximumCount <Int32>]
   [-InstanceMinimumCount <Int32>]
   [-DefaultInstanceCount <Int32>]
   [-DeploymentOrder <Int32>]
   [-Tag <String>]
   [-ServicingOrder <Int32>]
   [-NumberOfUpgradeDomains <Int32>]
   -ServiceTemplate <ServiceTemplate>
   -VMTemplate <Template>
   [-BlockAutomaticMigration \<Boolean\>]
   [-EnableAvailabilitySet \<Boolean\>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

Note

A new parameter [-EnableNestedVirtualization] <Boolean> is included in VMM 2019 UR1. For more information, see Parameters.

The Add-SCComputerTierTemplate cmdlet adds a computer tier template to a service template. A computer tier template contains a virtual machine template that is used to create a virtual machine.

For information about service templates, type Get-Help New-SCServiceTemplate -Detailed. For more information about virtual machine templates, type Get-Help New-SCVMTemplate -Detailed.

Examples

Example 1: Add a computer tier template to a service template

PS C:\> $WebTemplate = Get-SCVMTemplate | Where-Object { $_.Name -Eq "WebTemplate01" }
PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> Add-SCComputerTierTemplate -ServiceTemplate $ServiceTemplate -VMTemplate $WebTemplate -Name "Web Tier" -DefaultInstanceCount 3 -InstanceMinimumCount 1 -InstanceMaximumCount 5 -DeploymentOrder 1 -ServicingOrder 1 -NumberOfUpgradeDomains 1

The first command gets the virtual machine template object named WebTemplate01 and stores the object in the $WebTemplate variable.

The second command gets the service template object named ServiceTemplate01 and stores the object in the $ServiceTemplate variable.

The last command adds a computer tier template to the service template stored in $ServiceTemplate.

Parameters

-BlockAutomaticMigration

Indicates whether the computer can be automatically migrated. When set to $True, automatic migration is blocked. When set to $False, automatic migration is allowed. The default value is $False.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultInstanceCount

Specifies the default instance count for a computer tier that can be scaled out. The default value is 1.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeploymentOrder

Specifies the order in which a computer tier, application host, or application is deployed.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description for the computer tier template.

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

-EnableAvailabilitySet

Indicates whether an availability set is generated on a service tier when a service is deployed.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableNestedVirtualization

Enables the nested virtualization.

Note

This parameter is applicable for VMM 2019 UR1.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InstanceMaximumCount

Specifies the maximum number of virtual machines to which a service instance can scale out.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InstanceMinimumCount

Specifies the minimum number of virtual machines to which a service instance can scale in.

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

-Name

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

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NumberOfUpgradeDomains

Specifies the number of upgrade domains for a computer tier that can be scaled out. The default value is 1.

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

-ServiceTemplate

Specifies a service template object.

Type:ServiceTemplate
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServicingOrder

Specifies the order in which a computer tier or application host is serviced.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.

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

-VMTemplate

Specifies a VMM template object used to create virtual machines.

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

Outputs

ComputerTierTemplate

This cmdlet returns a ComputerTierTemplate object.