New-SCLoadBalancerTemplate

New-SCLoadBalancerTemplate

Creates a load balancer template that can be added to a service template.

Syntax

Parameter Set: Default
New-SCLoadBalancerTemplate -ComputerTierTemplate <ComputerTierTemplate> -LoadBalancerVIPTemplate <LoadBalancerVIPTemplate> -VirtualNetworkAdapter <VirtualNetworkAdapter> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMNetworkServiceSetting <String> ] [-VMNetworkVIP <VMNetwork> ] [ <CommonParameters>]

Parameter Set: LogicalNetworkVIP
New-SCLoadBalancerTemplate -ComputerTierTemplate <ComputerTierTemplate> -LoadBalancerVIPTemplate <LoadBalancerVIPTemplate> -LogicalNetworkVIP <LogicalNetwork> -VirtualNetworkAdapter <VirtualNetworkAdapter> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMNetworkServiceSetting <String> ] [-VMNetworkVIP <VMNetwork> ] [ <CommonParameters>]

Detailed Description

The New-SCLoadBalancerTemplate cmdlet creates a load balancer template that you can add to a service template. When you deploy a service instance based on the service template, Virtual Machine Manager (VMM) will locate an appropriate load balancer in your VMM environment during placement, and configure it based on the properties provided in the load balancer template.

Parameters

-ComputerTierTemplate<ComputerTierTemplate>

Specifies a computer tier template object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

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

-LoadBalancerVIPTemplate<LoadBalancerVIPTemplate>

Specifies a load balancer virtual IP (VIP) template.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LogicalNetworkVIP<LogicalNetwork>

Specifies the logical networks from which the front-end IP address for the load balancer should be assigned (the front-end logical network affinity).

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

-VirtualNetworkAdapter<VirtualNetworkAdapter>

Specifies a virtual network adapter object for a virtual machine. The number of virtual adapters for each type of host are:

Hyper-V: Up to four emulated adapters per virtual machine, and up to eight synthetic adapters per virtual machine. No driver is available for an emulated network adapter on a Windows Server 2003 x64 guest.

VMware ESX: Up to four emulated adapters per virtual machine.

Citrix XenServer: Up to seven emulated adapters per virtual machine.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMNetworkServiceSetting<String>

Specifies a VM network service setting.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMNetworkVIP<VMNetwork>

Specifies a VM Network object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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.

  • LoadBalancerTemplate

Examples

Example 1: Create a load balancer template

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

The second command gets the computer tier template for the service template stored in $ServiceTemplate, and then stores the object in the $TierTemplate variable.

The third command gets the load balancer VIP template with the manufacturer of LB Manufacturer and model LB01, and then stores the template in the $LBVIPTemplate variable.

The fourth command gets the virtual machine template for the computer tier template stored in $TierTemplate.

The fifth command gets the virtual network adapter for the virtual machine template stored in $VMTemplate.

The sixth command creates a load balancer template using the computer tier template, load balancer template, and virtual network adapter objects obtained in the previous commands, and then stores the object in the $LBTemplate variable.

The last command displays information about the load balancer template to the user.

PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $TierTemplate = Get-SCComputerTierTemplate -ServiceTemplate $ServiceTemplate
PS C:\> $LBVIPTemplate = Get-SCLoadBalancerVIPTemplate -Manufacturer "LB Manufacturer" -Model "LB01"
PS C:\> $VMTemplate = Get-SCVMTemplate -ComputerTierTemplate $TierTemplate
PS C:\> $Adapter = Get-SCVirtualNetworkAdapter -VMTemplate $VMTemplate
PS C:\> $LBTemplate = New-SCLoadBalancerTemplate -ComputerTierTemplate $TierTemplate -LoadBalancerVIPTemplate $LBVIPTemplate -VirtualNetworkAdapter $Adapter
PS C:\> $LBTemplate

Get-SCLoadBalancerTemplate

Remove-SCLoadBalancerTemplate

Set-SCLoadBalancerTemplate

Get-SCServiceTemplate

Get-SCComputerTierTemplate

Get-SCLoadBalancerVIPTemplate

Get-SCVMTemplate

Get-SCVirtualNetworkAdapter