File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Returns a load balancer backend address config.
2626### New loadbalancer address config with virtual network reference
2727``` powershell
2828PS C:\> $virtualNetwork = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup
29- New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetwork $virtualNetwork
29+ New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetworkId $virtualNetwork.Id
3030```
3131
3232## PARAMETERS
Original file line number Diff line number Diff line change @@ -35,9 +35,10 @@ Creates a backend address pool on a loadbalancer. Allows for specifiying a array
3535## create by passing loadbalancer without Ips
3636PS C:\> $virtualNetwork = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup
3737PS C:\> $lb = Get-AzLoadBalancer -ResourceGroupName $resourceGroup -Name $loadBalancerName
38- PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetwork $virtualNetwork
39- PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetwork $virtualNetwork
38+ PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetworkId $virtualNetwork.Id
39+ PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetworkId $virtualNetwork.Id
4040PS C:\> $ips = @($ip1, $ip2)
41+
4142PS C:\> $lb | New-AzLoadBalancerBackendAddressPool -Name $backendPool1
4243```
4344
@@ -49,13 +50,13 @@ PS C:\> $lb | New-AzLoadBalancerBackendAddressPool -Name $backendPool7 -LoadBala
4950
5051### Example 3
5152``` powershell
52- ## create by passing loadbalancer with ips
53+ ## create by name without ips
5354PS C:\> New-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool3
5455```
5556
5657### Example 4
5758``` powershell
58- ## create by passing loadbalancer with ips
59+ ## create by name with ips
5960PS C:\> New-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool3 -LoadBalancerBackendAddress $ips
6061```
6162
Original file line number Diff line number Diff line change @@ -49,16 +49,23 @@ Updates the backend pool on a loadbalancer
4949###Set by name and modified input object
5050PS C:\> $virtualNetwork = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup
5151PS C:\> $lb = Get-AzLoadBalancer -ResourceGroupName $resourceGroup -Name $loadBalancerName
52- PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetwork $virtualNetwork
53- PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetwork $virtualNetwork
52+ PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetworkId $virtualNetwork.Id
53+ PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetworkId $virtualNetwork.Id
54+ PS C:\> $ip3 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.7" -Name "TestVNetRef3" -VirtualNetworkId $virtualNetwork.id
5455PS C:\> $ips = @($ip1, $ip2)
5556PS C:\> $b2 = Get-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool1
56- PS C:\> $b2.LoadBalancerBackendAddresses.Add($ip)
57+ PS C:\> $b2.LoadBalancerBackendAddresses.Add($ip3)
58+
5759PS C:\> Set-AzLoadBalancerBackendAddressPool -InputObject $b2
5860```
59-
6061### Example 2
6162``` powershell
63+ ###Set by specific backend from piped loadbalancer and set two IP's
64+ PS C:\> $lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ips -Name $backendPool1
65+ ```
66+
67+ ### Example 3
68+ ``` powershell
6269### #set by ResourceId
6370PS C:\> Set-AzLoadBalancerBackendAddressPool -ResourceId b2.Id -LoadBalancerBackendAddress $b2.LoadBalancerBackendAddresses
6471```
You can’t perform that action at this time.
0 commit comments