Skip to content

Commit

Permalink
Update Set-AzVirtualNetwork.md (#13857)
Browse files Browse the repository at this point in the history
* Update Set-AzVirtualNetwork.md

Updated comment for Example 1

* Update Set-AzVirtualNetwork.md

- specify language of code block
- indentation

Co-authored-by: Yeming Liu <[email protected]>
  • Loading branch information
jhaprakash26 and isra-fel authored Dec 30, 2020
1 parent 84b03de commit 1f77b70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Network/Network/help/Set-AzVirtualNetwork.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ The **Set-AzVirtualNetwork** cmdlet updates a virtual network.
## EXAMPLES

### 1: Creates a virtual network and removes one of its subnets
```
New-AzResourceGroup -Name TestResourceGroup -Location centralus
$frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" ## Create resource group
```powershell
New-AzResourceGroup -Name TestResourceGroup -Location centralus ## Create resource group
$frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" ## Create frontend subnet
$backendSubnet = New-AzVirtualNetworkSubnetConfig -Name backendSubnet -AddressPrefix "10.0.2.0/24" ## Create backend subnet
$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName
TestResourceGroup -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet,$backendSubnet ## Create virtual network
$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup `
-Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet,$backendSubnet ## Create virtual network
Remove-AzVirtualNetworkSubnetConfig -Name backendSubnet -VirtualNetwork $virtualNetwork ## Remove subnet from in memory representation of virtual network
Expand Down

0 comments on commit 1f77b70

Please sign in to comment.