Add-SCLoadBalancer

Adds a load balancer to VMM.

Description

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

For more information about Add-SCLoadBalancer, type: "Get-Help Add-SCLoadBalancer -online".

Parameters

LoadBalancerAddress

Required? true
Accept Pipeline Input? false
Position? 0
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.

Manufacturer

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of the company that manufactured a physical device.

Valid characters include: letters (a-z), numbers (0-9), underscore (_), hyphen(-), dot(.), and single quote(').

Model

Required? true
Accept Pipeline Input? false
Position? named
Specifies the model of a physical device.

RunAsAccount

Required? true
Accept Pipeline Input? false
Position? named
Specifies a Run As account that contains credentials with permission to perform this action.

VMHostGroup

Required? true
Accept Pipeline Input? false
Position? named
Specifies a virtual machine host group object.

ConfigurationProvider

Required? false
Accept Pipeline Input? false
Position? named
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 will not be added.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LogicalNetworkDedicatedIP

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical networks from which the back-end IP address for the load balancer should be assigned (the back-end logical network affinity).

LogicalNetworkVIP

Required? false
Accept Pipeline Input? false
Position? named
Specifies the logical networks from which the front-end IP address for the load balancer should be assigned (the front-end logical network affinity).

Port

Required? false
Accept Pipeline Input? false
Position? named
Specifies the network port to use when adding an object or creating a connection. Valid values are: 1 to 4095.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Add a load balancer.
PS C:\> $LBProvider = Get-SCConfigurationProvider | where { $_.Type -eq "LoadBalancer" -and $_.Manufacturer -eq "LBManufacturer" -and $_.Model -eq "LB01"} 
PS C:\> $HostGroup =@()
PS C:\> $HostGroup += Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup01" }
PS C:\> $HostGroup += Get-SCVMHostGroup | where { $_.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 RunAs 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.

See Also