New-SCLoadBalancerVIPMember
Adds a virtual machine to a load balancer VIP.
Syntax
Default (Default)
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.
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 |
-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 |
-LoadBalancerVIP
Specifies a VIP in a load balancer.
Parameter properties
Type: | LoadBalancerVIP |
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 |
-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: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Port
Specifies the network port to use when adding an object or creating a connection. Valid values are: 1 to 4095.
Parameter properties
Type: | UInt16 |
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 |
-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.
Parameter properties
Type: | VirtualNetworkAdapter |
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 |
-VMMServer
Specifies a Virtual Machine Manager (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
LoadBalancerVIPMember
This cmdlet returns a LoadBalancerVIPMember object.