From 6bf5b8443362db668cb5f00010cea8c6775bc57a Mon Sep 17 00:00:00 2001 From: Ali Egal Date: Thu, 4 Jun 2020 20:00:01 -0700 Subject: [PATCH] updating help files examples --- .../New-AzLoadBalancerBackendAddressConfig.md | 2 +- .../help/New-AzLoadBalancerBackendAddressPool.md | 9 +++++---- .../help/Set-AzLoadBalancerBackendAddressPool.md | 15 +++++++++++---- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Network/Network/help/New-AzLoadBalancerBackendAddressConfig.md b/src/Network/Network/help/New-AzLoadBalancerBackendAddressConfig.md index 400e1a65588d..d05b15076307 100644 --- a/src/Network/Network/help/New-AzLoadBalancerBackendAddressConfig.md +++ b/src/Network/Network/help/New-AzLoadBalancerBackendAddressConfig.md @@ -26,7 +26,7 @@ Returns a load balancer backend address config. ### New loadbalancer address config with virtual network reference ```powershell PS C:\> $virtualNetwork = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup -New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetwork $virtualNetwork +New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetworkId $virtualNetwork.Id ``` ## PARAMETERS diff --git a/src/Network/Network/help/New-AzLoadBalancerBackendAddressPool.md b/src/Network/Network/help/New-AzLoadBalancerBackendAddressPool.md index 2783e6aab5c4..e7b1ca120caf 100644 --- a/src/Network/Network/help/New-AzLoadBalancerBackendAddressPool.md +++ b/src/Network/Network/help/New-AzLoadBalancerBackendAddressPool.md @@ -35,9 +35,10 @@ Creates a backend address pool on a loadbalancer. Allows for specifiying a array ## create by passing loadbalancer without Ips PS C:\> $virtualNetwork = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup PS C:\> $lb = Get-AzLoadBalancer -ResourceGroupName $resourceGroup -Name $loadBalancerName -PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetwork $virtualNetwork -PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetwork $virtualNetwork +PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetworkId $virtualNetwork.Id +PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetworkId $virtualNetwork.Id PS C:\> $ips = @($ip1, $ip2) + PS C:\> $lb | New-AzLoadBalancerBackendAddressPool -Name $backendPool1 ``` @@ -49,13 +50,13 @@ PS C:\> $lb | New-AzLoadBalancerBackendAddressPool -Name $backendPool7 -LoadBala ### Example 3 ```powershell -## create by passing loadbalancer with ips +## create by name without ips PS C:\> New-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool3 ``` ### Example 4 ```powershell -## create by passing loadbalancer with ips +## create by name with ips PS C:\> New-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool3 -LoadBalancerBackendAddress $ips ``` diff --git a/src/Network/Network/help/Set-AzLoadBalancerBackendAddressPool.md b/src/Network/Network/help/Set-AzLoadBalancerBackendAddressPool.md index 2971793ef213..8dfbcd5e50ab 100644 --- a/src/Network/Network/help/Set-AzLoadBalancerBackendAddressPool.md +++ b/src/Network/Network/help/Set-AzLoadBalancerBackendAddressPool.md @@ -49,16 +49,23 @@ Updates the backend pool on a loadbalancer ###Set by name and modified input object PS C:\> $virtualNetwork = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroup PS C:\> $lb = Get-AzLoadBalancer -ResourceGroupName $resourceGroup -Name $loadBalancerName -PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetwork $virtualNetwork -PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetwork $virtualNetwork +PS C:\> $ip1 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.5" -Name "TestVNetRef" -VirtualNetworkId $virtualNetwork.Id +PS C:\> $ip2 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.6" -Name "TestVNetRef2" -VirtualNetworkId $virtualNetwork.Id +PS C:\> $ip3 = New-AzLoadBalancerBackendAddressConfig -IpAddress "10.0.0.7" -Name "TestVNetRef3" -VirtualNetworkId $virtualNetwork.id PS C:\> $ips = @($ip1, $ip2) PS C:\> $b2 = Get-AzLoadBalancerBackendAddressPool -ResourceGroupName $resourceGroup -LoadBalancerName $loadBalancerName -Name $backendPool1 -PS C:\> $b2.LoadBalancerBackendAddresses.Add($ip) +PS C:\> $b2.LoadBalancerBackendAddresses.Add($ip3) + PS C:\> Set-AzLoadBalancerBackendAddressPool -InputObject $b2 ``` - ### Example 2 ```powershell +###Set by specific backend from piped loadbalancer and set two IP's +PS C:\> $lb | Set-AzLoadBalancerBackendAddressPool -LoadBalancerBackendAddress $ips -Name $backendPool1 +``` + +### Example 3 +```powershell ### #set by ResourceId PS C:\> Set-AzLoadBalancerBackendAddressPool -ResourceId b2.Id -LoadBalancerBackendAddress $b2.LoadBalancerBackendAddresses ```