New-SCLoadBalancerVIPMember

Adds a virtual machine to a load balancer VIP.

Syntax

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

Description

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

Examples

Example 1: Add a virtual machine to a load balancer virtual IP

PS C:\> $VM = Get-VM -Name "VM01" -VMHost "VMHost01.Contoso.com" 
PS C:\> $VNIC = Get-SCVirtualNetworkAdapter -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.

Parameters

-IPAddress

Specifies an IPv4 or IPv6 address.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LoadBalancerVIP

Specifies a VIP in a load balancer.

Type:LoadBalancerVIP
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Port

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

Type:UInt16
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters: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.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VirtualNetworkAdapter

Specifies a virtual network adapter object for a virtual machine.

The maximum number of virtual network adapters varies by the type of host. If the host type is Hyper-V, the maximum number of virtual network adapters is:

  • Up to four emulated adapters per virtual machine.
  • Up to eight synthetic adapters per virtual machine. An exception is that no driver is available for an emulated network adapter on a Windows Server 2003 x64 guest.

If the host type is VMware ESX:

  • Up to four emulated adapters per virtual machine.

If the host type is Citrix XenServer:

  • Up to seven emulated adapters per virtual machine.
Type:VirtualNetworkAdapter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

LoadBalancerVIPMember

This cmdlet returns a LoadBalancerVIPMember object.