New-SCLoadBalancerVIPMember

New-SCLoadBalancerVIPMember

Adds a virtual machine to a load balancer VIP.

Syntax

Parameter Set: Default
New-SCLoadBalancerVIPMember -IPAddress <String> -LoadBalancerVIP <LoadBalancerVIP> -Port <UInt16> -VirtualNetworkAdapter <VirtualNetworkAdapter> [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

The New-SCLoadBalancerVIPMember cmdlet adds a virtual machine to a load balancer virtual IP (VIP).

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

-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

-LoadBalancerVIP<LoadBalancerVIP>

Specifies a virtual IP (VIP) in a load balancer.

Aliases

none

Required?

true

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?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Port<UInt16>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of 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

-VirtualNetworkAdapter<VirtualNetworkAdapter>

Specifies a virtual network adapter object for a virtual machine. The number of virtual adapters for each type of host are:

Hyper-V: Up to four emulated adapters per virtual machine, and up to eight synthetic adapters per virtual machine. No driver is available for an emulated network adapter on a Windows Server 2003 x64 guest.

VMware ESX: Up to four emulated adapters per virtual machine.

Citrix XenServer: Up to seven emulated adapters per virtual machine.

Aliases

none

Required?

true

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.

  • LoadBalancerVIPMember

Examples

Example Example 1: Add a virtual machine to a load balancer virtual IP (VIP).

The first command gets the virtual machine object named VM01 on VMHost01, and then stores the object in the $VM variable.

The second command gets the virtual network adapter for the virtual machine stored in $VM, and then stores the object in the $VNIC variable.

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

The fourth command gets the load balancer VIP with the address 10.0.0.1 for the load balancer stored in $LoadBalancer, and then stores the object in the $VIP variable.

The last command adds the virtual network adapter stored in $VNIC to the load balancer VIP stored in $VIP.

PS C:\> $VM = Get-VM -Name "VM01" -VMHost "VMHost01.Contoso.com"
PS C:\> $VNIC = Get-VirtualNetworkAdapter -VM $VM
PS C:\> $LoadBalancer = Get-SCLoadBalancer -LoadBalancerAddress "LB01.Contoso.com"
PS C:\> $VIP = Get-SCLoadBalancerVIP -LoadBalancer $LoadBalancer -IPAddress "10.0.0.1"
PS C:\> New-SCLoadBalancerVIPMember -LoadBalancerVIP $VIP -IPAddress "10.0.0.1" -Port 35 -VirtualNetworkAdapter $VNIC

Disable-SCLoadBalancerVIPMember

Enable-SCLoadBalancerVIPMember

Get-SCLoadBalancer

Get-SCLoadBalancerVIP

Get-SCLoadBalancerVIPMember

Remove-SCLoadBalancerVIPMember