Share via


New-SCLoadBalancerVIP

New-SCLoadBalancerVIP

Creates a load balancer VIP on a load balancer.

Syntax

Parameter Set: Default
New-SCLoadBalancerVIP -IPAddress <String> -LoadBalancer <LoadBalancer> -Name <String> [-IsPersistenceEnabled <Boolean]> ] [-JobVariable <String> ] [-LoadBalancerConnectionPersistence <LoadBalancerConnectionPersistence> ] [-LoadBalancerHealthMonitor <LoadBalancerHealthMonitor[]> ] [-LoadBalancerPort <UInt16]> ] [-LoadBalancerProtocol <LoadBalancerProtocol> ] [-LoadBalancerVIPTemplate <LoadBalancerVIPTemplate> ] [-LoadBalancingMethod <LoadBalancingMethod> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

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

Parameters

-IPAddress<String>

Specifies an IPv4 or IPv6 address.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IsPersistenceEnabled<Boolean]>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancer<LoadBalancer>

Specifies a load balancer object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancerConnectionPersistence<LoadBalancerConnectionPersistence>

Specifies a load balancer connection persistence object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancerHealthMonitor<LoadBalancerHealthMonitor[]>

Specifies a load balancer health monitor object or objects.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancerPort<UInt16]>

Specifies the port to use when configuring a virtual IP (VIP) in a load balancer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancerProtocol<LoadBalancerProtocol>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancerVIPTemplate<LoadBalancerVIPTemplate>

Specifies a load balancer virtual IP (VIP) template.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Aliases

none

Required?

false

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • LoadBalancerVIP

Notes

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

Examples

Example 1: Create a load balancer virtual IP (VIP)

The first command creates a load balancer protocol object, and then stores the object in the $LBProtocol variable.

The second command creates a load balancer connection persistence object, and then 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 then stores the object in the $LBMethod variable.

The fifth command gets the load balancer object with the address LB01.Contoso.com, and then 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.

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

Get-SCLoadBalancer

Get-SCLoadBalancerVIP

Read-SCLoadBalancerVIP

Remove-SCLoadBalancerVIP

New-SCLoadBalancerProtocol

New-SCLoadBalancerConnectionPersistence

New-SCLoadBalancerHealthMonitor

New-SCLoadBalancingMethod