Partager via


New-SCLoadBalancerVIP

Creates a load balancer VIP on a load balancer.

Syntax

Default (Default)

New-SCLoadBalancerVIP
    [-VMMServer <ServerConnection>]
    -Name <String>
    -LoadBalancer <LoadBalancer>
    -IPAddress <String>
    [-LoadBalancerPort <UInt16>]
    [-LoadBalancerVIPTemplate <LoadBalancerVIPTemplate>]
    [-IsPersistenceEnabled <Boolean>]
    [-LoadBalancerConnectionPersistence <LoadBalancerConnectionPersistence>]
    [-LoadBalancerHealthMonitor <LoadBalancerHealthMonitor[]>]
    [-LoadBalancerProtocol <LoadBalancerProtocol>]
    [-LoadBalancingMethod <LoadBalancingMethod>]
    [-FrontEndVMNetwork <VMNetwork>]
    [-BackEndVirtualNetworkAdapters <VirtualNetworkAdapter[]>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

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

Examples

Example 1: Create a load balancer virtual IP

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.

Parameters

-BackEndVirtualNetworkAdapters

Specifies the list of VirtualNetworkAdapter objects of the VMs that are load balanced.

Parameter properties

Type:

VirtualNetworkAdapter[]

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

-FrontEndVMNetwork

Specifies the virtual machine network for the front end IP of the load balancing rule. This is the network from which the load balancer VIP is taken.

Parameter properties

Type:VMNetwork
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

-IPAddress

Specifies an IPv4 or IPv6 address.

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

-IsPersistenceEnabled

Indicates whether persistence is enabled for a load balancer VIP. When set to $True, the load balancer attempts to direct a particular client to the same virtual machine behind the load balancer.

Parameter properties

Type:Boolean
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

-LoadBalancer

Specifies a load balancer object.

Parameter properties

Type:LoadBalancer
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

-LoadBalancerConnectionPersistence

Specifies a load balancer connection persistence object.

Parameter properties

Type:LoadBalancerConnectionPersistence
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

-LoadBalancerHealthMonitor

Specifies a load balancer health monitor object.

Parameter properties

Type:

LoadBalancerHealthMonitor[]

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

-LoadBalancerPort

Specifies the port to use when configuring a VIP in a load balancer.

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

-LoadBalancerProtocol

Specifies the protocol to use when connecting to a load balancer, or a load balancer protocol object.

Parameter properties

Type:LoadBalancerProtocol
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

-LoadBalancerVIPTemplate

Specifies a load balancer VIP template.

Parameter properties

Type:LoadBalancerVIPTemplate
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

-LoadBalancingMethod

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

Parameter properties

Type:LoadBalancingMethod
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

-Name

Specifies the name of a Virtual Machine Manager (VMM) object.

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

-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

-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

-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

LoadBalancerVIP

This cmdlet returns a LoadBalancerVIP object.

Notes

  • Requires a VMM load balancer object, which can be retrieved using the Get-SCLoadBalancer cmdlet.