New-SCLoadBalancerVIPMember

Adds a virtual machine to a load balancer VIP.

Description

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

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

Parameters

IPAddress

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

LoadBalancerVIP

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

Port

Required? true
Accept Pipeline Input? false
Position? named
Specifies the network port to use when adding an object or creating a connection. Valid values are: 1 to 4095.

VirtualNetworkAdapter

Required? true
Accept Pipeline Input? false
Position? named
Specifies a virtual network adapter object for a virtual machine. 

TYPE OF HOST	NUMBER OF VIRTUAL NETWORK ADAPTERS
------------	----------------------------------
Hyper-V		 Up to 4 emulated adapters per virtual machine.
Up to 8 synthetic adapters per virtual machine.
(Exception: no driver available for an emulated 
network adapter on a Windows Server 2003 x64 guest.)
VMware ESX		Up to 4 emulated adapters per virtual machine.
Citrix XenServer  Up to 7 emulated adapters per virtual machine.

JobVariable

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

Name

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

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.

Examples

1: Add a virtual machine to a load balancer virtual IP (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
The first command gets the virtual machine object named VM01 on VMHost01 and stores the object in the $VM variable.

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

The third command gets the load balancer with the address LB01.Contoso.com and 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 stores the object in the $VIP variable.

The last command adds the virtual network adapter stored in $VNIC (in this case, the virtual network adapter for VM01) to the load balancer VIP stored in $VIP.

See Also