Share via


Add-SCLoadBalancer

Adds a load balancer to VMM.

Syntax

Default (Default)

Add-SCLoadBalancer
    [-VMMServer <ServerConnection>]
    [-LoadBalancerAddress] <String>
    [-Port <UInt16>]
    -Manufacturer <String>
    -Model <String>
    -RunAsAccount <RunAsAccount>
    [-ConfigurationProvider <ConfigurationProvider>]
    -VMHostGroup <HostGroup[]>
    [-LogicalNetworkVIP <LogicalNetwork[]>]
    [-LogicalNetworkDedicatedIP <LogicalNetwork[]>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<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.

Parameter properties

Type:ConfigurationProvider
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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).

Parameter properties

Type:

LogicalNetwork[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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).

Parameter properties

Type:

LogicalNetwork[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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 (')

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Model

Specifies the model of a physical device.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Port

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

Parameter properties

Type:UInt16
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsAccount

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

Parameter properties

Type:RunAsAccount
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMHostGroup

Specifies a virtual machine host group object.

Parameter properties

Type:

HostGroup[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

LoadBalancer

This cmdlet returns a LoadBalancer object.