From 1cf82cb0583f3a0219087881f313a4368e17a616 Mon Sep 17 00:00:00 2001 From: Anavi N Date: Wed, 9 May 2018 15:40:34 -0700 Subject: [PATCH] Update Set-AzureRmVirtualNetwork.md --- .../help/Set-AzureRmVirtualNetwork.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ResourceManager/Network/Commands.Network/help/Set-AzureRmVirtualNetwork.md b/src/ResourceManager/Network/Commands.Network/help/Set-AzureRmVirtualNetwork.md index fd9732d867..e7bb064741 100644 --- a/src/ResourceManager/Network/Commands.Network/help/Set-AzureRmVirtualNetwork.md +++ b/src/ResourceManager/Network/Commands.Network/help/Set-AzureRmVirtualNetwork.md @@ -26,21 +26,18 @@ The **Set-AzureRmVirtualNetwork** cmdlet sets the goal state for an Azure virtua ### 1: Creates a virtual network and removes one of its subnets ``` New-AzureRmResourceGroup -Name TestResourceGroup -Location centralus - $frontendSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" - -$backendSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name backendSubnet -AddressPrefix "10.0.2.0/24" + $frontendSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" ## Create resource group +$backendSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name backendSubnet -AddressPrefix "10.0.2.0/24" ## Create backend subnet $virtualNetwork = New-AzureRmVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName - TestResourceGroup -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet,$backendSubnet + TestResourceGroup -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet,$backendSubnet ## Create virtual network -Remove-AzureRmVirtualNetworkSubnetConfig -Name backendSubnet -VirtualNetwork $virtualNetwork +Remove-AzureRmVirtualNetworkSubnetConfig -Name backendSubnet -VirtualNetwork $virtualNetwork ## Remove subnet from in memory representation of virtual network -$virtualNetwork | Set-AzureRmVirtualNetwork +$virtualNetwork | Set-AzureRmVirtualNetwork ## Remove subnet from virtual network ``` -This example creates a virtual network with two subnets. Then it removes one subnet from - the in-memory representation of the virtual network. The Set-AzureRmVirtualNetwork cmdlet - is then used to write the modified virtual network state on the service side. +This example creates a virtual network called TestResourceGroup with two subnets: frontendSubnet and backendSubnet. Then it removes backendSubnet subnet from the in-memory representation of the virtual network. The Set-AzureRmVirtualNetwork cmdlet is then used to write the modified virtual network state on the service side. When the Set-AzureRmVirtualNetwork cmdlet is executed, the backendSubnet is removed. ## PARAMETERS