Add-SCLoadBalancer

Adds a load balancer to VMM.

Syntax

Add-SCLoadBalancer [-LoadBalancerAddress] <String> [-ConfigurationProvider <ConfigurationProvider>]
 [-JobVariable <String>] [-LogicalNetworkDedicatedIP <LogicalNetwork[]>]
 [-LogicalNetworkVIP <LogicalNetwork[]>] -Manufacturer <String> -Model <String> [-PROTipID <Guid>]
 [-Port <UInt16>] -RunAsAccount <RunAsAccount> [-RunAsynchronously] -VMHostGroup <HostGroup[]>
 [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The Add-SCLoadBalancer cmdlet adds a load balancer to Virtual Machine Manager (VMM).

Examples

Example 1: Add a load balancer

PS C:\> $LBProvider = Get-SCConfigurationProvider | Where-Object { $_.Type -Eq "LoadBalancer" -And $_.Manufacturer -Eq "LBManufacturer" -And $_.Model -Eq "LB01"} 
PS C:\> $HostGroup =@()
PS C:\> $HostGroup += Get-SCVMHostGroup | Where-Object { $_.Path -Eq "All Hosts\HostGroup01" }
PS C:\> $HostGroup += Get-SCVMHostGroup | Where-Object { $_.Path -Eq "All Hosts\HostGroup02\Production" }
PS C:\> $RunAsAcct = Get-SCRunAsAccount -Name "LBRunAsAcct" 
PS C:\> Add-SCLoadBalancer -ConfigurationProvider $LBProvider -VMHostGroup $HostGroup -RunAsAccount $RunAsAcct -LoadBalancerAddress "LB.Contoso.com" -Manufacturer "LBManufacturer" -Model "LB01" -Port "123"

The first command gets the load balancer provider object with the specified manufacturer and model and stores the object in the $LBProvider variable.

The second command creates an array named $HostGroup. The third and fourth commands populate the $HostGroup array with host groups named HostGroup01 and Production.

The fifth command gets the Run As account object named LBRunAsAcct and stores the object in the $RunAsAcct variable.

The last command adds the load balancer using the specified Run As account.

Parameters

-ConfigurationProvider

Specifies a configuration provider object.

A configuration provider is a plug-in to VMM that translates VMM PowerShell commands to API calls that are specific to a type of load balancer. If no configuration provider is specified, VMM uses the Manufacturer and Model information to choose an available configuration provider. If no configuration provider is found, the load balancer is not added.

Type:ConfigurationProvider
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
-LoadBalancerAddress

Specifies the fully qualified domain name (FQDN) or IP address of a load balancer. Usual formats are FQDN, IPv4 or IPv6 addresses, but check with the load balancer manufacturer for the valid format for your load balancer.

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

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

Type:LogicalNetwork[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogicalNetworkVIP

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

Type:LogicalNetwork[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Manufacturer

Specifies the name of the company that manufactured a physical device. Valid characters include:

- Letters (a-z)

  • Numbers (0-9)
  • Underscore (_)
  • Hyphen(-)
  • Dot (.)
  • Single quote (')

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

Specifies the model of a physical device.

Type:String
Required:True
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
-Port

Specifies the network port to use when adding an object or creating a connection. Valid values are: 1 to 4095.

Type:UInt16
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsAccount

Specifies a Run As account that contains credentials with permission to perform this action.

Type:RunAsAccount
Required:True
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.

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

Specifies a VMM server object.

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

Outputs

LoadBalancer

This cmdlet returns a **LoadBalancer** object.