New-SCLoadBalancerVIP

Creates a load balancer VIP on a load balancer.

Description

The New-SCLoadBalancerVIP cmdlet creates a load balancer virtual IP (VIP) on a load balancer.

For more information about New-SCLoadBalancerVIP, type: "Get-Help New-SLoadBalancerVIP -online".

Parameters

IPAddress

Required? true
Accept Pipeline Input? false
Position? named
Specifies an IPv4 or IPv6 address.  

LoadBalancer

Required? true
Accept Pipeline Input? false
Position? named
Specifies a load balancer object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

IsPersistenceEnabled

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether persistence is enabled for a load balancer virtual IP (VIP). When set to $True, the load balancer will always attempt to direct a particular client to the same virtual machine behind the load balancer.

JobVariable

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

LoadBalancerConnectionPersistence

Required? false
Accept Pipeline Input? false
Position? named
Specifies a load balancer connection persistence object.

LoadBalancerHealthMonitor

Required? false
Accept Pipeline Input? false
Position? named
Specifies a load balancer health monitor object.

LoadBalancerPort

Required? false
Accept Pipeline Input? false
Position? named
Specifies the port to use when configuring a virtual IP (VIP) in a load balancer.

LoadBalancerProtocol

Required? false
Accept Pipeline Input? false
Position? named
Specifies the protocol to use when connecting to a load balancer, or a load balancer protocol object.

LoadBalancerVIPTemplate

Required? false
Accept Pipeline Input? false
Position? named
Specifies a load balancer virtual IP (VIP) template.

LoadBalancingMethod

Required? false
Accept Pipeline Input? false
Position? named
Specifies the load balancing method to use. Valid values are: RoundRobin, LeastConnectionsmember, Observedmember, Predictivemember, Ratiomember, Fastestmember, LeastConnections, Observednode, Predictivenode, Rationode, FastestResponseTime, LeastSessions, None

To determine the available methods for a specific load balancer, use the following command: (Get-SCLoadBalancer)[0].AvailableLoadBalancingMethods

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.
Requires a VMM load balancer object, which can be retrieved using the Get-SCLoadBalancer cmdlet.

Examples

1: Create a load balancer virtual IP (VIP).
PS C:\> $LBProtocol = New-SCLoadBalancerProtocol -Name HTTPS -HTTPSCertificateSubjectName "C=US,ST=WA,L=Redmond,O=Contoso,OU=Test,CN=www.contoso.com/emailAddress=contoso@contoso.com" -HTTPSReencryptConnection $True -TerminateHTTPS $True
PS C:\> $LBConnectionPersistence = New-SCLoadBalancerConnectionPersistence -Name SourceIP -Value "255.255.255.0"
PS C:\> $LBHealthMonitor = New-SCLoadBalancerHealthMonitor -Name HTTPMonitor -Request "Get /Index.html HTTP/1.1" -Response 200 -IntervalSeconds 5 -TimeoutSeconds 2 -ProtocolName "HTTPS"
PS C:\> $LBMethod = New-SCLoadBalancingMethod -Name "LeastConnections"
PS C:\> $LoadBalancer = Get-SCLoadBalancer -LoadBalancerAddress "LB01.Contoso.com"
PS C:\> New-SCLoadBalancerVIP -Name "LoadBalancerVIP01" -IPAddress 10.0.0.1 -LoadBalancer $LoadBalancer -LoadBalancerConnectionPersistence $LBConnectionPersistence -LoadBalancerProtocol $LBProtocol -LoadBalancingMethod $LBMethod -LoadBalancerHealthMonitor $LBHealthMonitor -LoadBalancerPort 80
The first command creates a load balancer protocol object and stores the object in the $LBProtocol variable.

The second command creates a load balancer connection persistence object and stores the object in the $LBConnectionPersistence variable.

The third command creates a load balancer health monitor object and stores the object in the $LBHealthMonitor variable.

The fourth command creates a load balancing method object and stores the object in the $LBMethod variable.

The fifth command gets the load balancer object with the address LB01.Contoso.com and stores the object in the $LoadBalancer variable.

The last command creates a load balancer VIP named LoadBalancerVIP01 using the load balancer stored in $LoadBalancer and the objects created in the previous commands.

See Also