Dela via


New-SCLoadBalancerRoleConfiguration

Creates a load balancer role configuration.

Syntax

Default (Default)

New-SCLoadBalancerRoleConfiguration
    [-VMMServer <ServerConnection>]
    -LBManagerIPAddress <String>
    [-NatIPExemptions <System.Collections.Generic.List`1[System.String]>]
    [-VipPools <System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.StaticIPAddressPool]>]
    [<CommonParameters>]

Description

The New-SCLoadBalancerRoleConfiguration cmdlet creates a load balancer role configuration in Virtual Machine Manager (VMM).

Examples

Example 1: Create a load balancer role configuration

PS C:\> $IpPool1 = Get-SCStaticIPAddressPool -Name "Private VIP Logical Network"
PS C:\> $IpPool2 = Get-SCStaticIPAddressPool -Name "Public VIP Logical Network"
PS C:\> $NetworkService = Get-SCNetworkService -Name "NC"
PS C:\> $FabricRole =  Get-SCFabricRole -Type LoadBalancer -NetworkService $NetworkService
PS C:\> $NatIPExemptions = @()
PS C:\> $FabricRoleConfiguration = New-SCLoadBalancerRoleConfiguration -LBManagerIPAddress "10.20.20.254" -NatIPExemptions $NatIPExemptions -VipPools @($IpPool1, $IpPool2)

The first two commands get IP pools from the private and public VIP logical networks by using the Get-SCStaticIPAddressPool cmdlet.

The third command gets the network service named NC by using the Get-SCNetworkService cmdlet.

The fourth command gets the load balancer fabric role from the network service by using the Get-SCFabricRole cmdlet.

The fifth command creates an array variable named $NatIPExemptions.

The final command creates a load balancer configuration object that has the SLBM VIP address 10.20.20.254 and the VIP pools.

Parameters

-LBManagerIPAddress

Specifies the load balancer manager virtual IP 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

-NatIPExemptions

Specifies the NatIPExempltions subnets list.

Parameter properties

Type:

System.Collections.Generic.List`1[System.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

-VipPools

Specifies the list of VIP pools that are published to the load balancer manager. The VIP pools are used for NAT and load balancing.

Parameter properties

Type:

System.Collections.Generic.List`1[Microsoft.SystemCenter.VirtualMachineManager.StaticIPAddressPool]

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

-VMMServer

Specifies a 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.