Skip to content

Commit 2b47337

Browse files
authored
Merge pull request #108783 from TimShererWithAquent/us1669724r
Azure CLI syntax blocks.
2 parents b5ceb5b + f581f68 commit 2b47337

11 files changed

+50
-29
lines changed

articles/virtual-network/create-peering-different-deployment-models-subscriptions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ This tutorial uses different accounts for each subscription. If you're using an
201201

202202
5. Log in to UserB's subscription as UserB to use Resource Manager commands by entering the `Connect-AzAccount` command.
203203
6. Assign UserA permissions to virtual network B. Copy the following script to a text editor on your PC and replace `<SubscriptionB-id>` with the ID of subscription B. If you don't know the subscription Id, enter the `Get-AzSubscription` command to view it. The value for **Id** in the returned output is your subscription ID. Azure created the virtual network (classic) you created in step 4 in a resource group named *Default-Networking*. To execute the script, copy the modified script, paste it in to PowerShell, and then press `Enter`.
204-
205-
```powershell
204+
205+
```powershell
206206
New-AzRoleAssignment `
207207
-SignInName [email protected] `
208208
-RoleDefinitionName "Classic Network Contributor" `

articles/virtual-network/ipv6-add-to-existing-vnet-cli.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ Before you deploy a dual stack application in Azure, you must configure your sub
3636
az feature register --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
3737
az feature register --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
3838
```
39+
3940
It takes up to 30 minutes for feature registration to complete. You can check your registration status by running the following Azure CLI command:
4041

41-
```azurelci
42+
```azurecli
4243
az feature show --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
4344
az feature show --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
4445
```
46+
4547
After the registration is complete, run the following command:
4648

47-
```azurelci
49+
```azurecli
4850
az provider register --namespace Microsoft.Network
4951
```
5052

articles/virtual-network/scripts/virtual-network-cli-sample-ipv6-dual-stack-standard-load-balancer.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ To use the IPv6 for Azure virtual network feature, you must configure your subsc
2929
az feature register --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
3030
az feature register --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
3131
```
32+
3233
It takes up to 30 minutes for feature registration to complete. You can check your registration status by running the following Azure CLI command:
3334

34-
```azurelci
35+
```azurecli
3536
az feature show --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
3637
az feature show --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
3738
```
39+
3840
After the registration is complete, run the following command:
3941

40-
```azurelci
42+
```azurecli
4143
az provider register --namespace Microsoft.Network
4244
```
4345

@@ -274,6 +276,7 @@ az vm create \
274276
--availability-set dsAVset \
275277
--image MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest
276278
```
279+
277280
## View IPv6 dual stack virtual network in Azure portal
278281
You can view the IPv6 dual stack virtual network in Azure portal as follows:
279282
1. In the portal's search bar, enter *dsVnet*.

articles/virtual-network/scripts/virtual-network-cli-sample-ipv6-dual-stack.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ To use the IPv6 for Azure virtual network feature, you must configure your subsc
2929
az feature register --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
3030
az feature register --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
3131
```
32+
3233
It takes up to 30 minutes for feature registration to complete. You can check your registration status by running the following Azure CLI command:
3334

34-
```azurelci
35+
```azurecli
3536
az feature show --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
3637
az feature show --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
3738
```
39+
3840
After the registration is complete, run the following command:
3941

40-
```azurelci
42+
```azurecli
4143
az provider register --namespace Microsoft.Network
4244
```
4345

@@ -256,6 +258,7 @@ az vm create \
256258
--image MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest
257259
258260
```
261+
259262
## Clean up deployment
260263

261264
Run the following command to remove the resource group, VM, and all related resources:

articles/virtual-network/tutorial-create-route-table-cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ az vm extension set \
151151
--publisher Microsoft.Azure.Extensions \
152152
--settings '{"commandToExecute":"sudo sysctl -w net.ipv4.ip_forward=1"}'
153153
```
154+
154155
The command may take up to a minute to execute.
155156

156157
## Create virtual machines
@@ -227,7 +228,7 @@ traceroute myVmPublic
227228

228229
The response is similar to the following example:
229230

230-
```bash
231+
```output
231232
traceroute to myVmPublic (10.0.0.4), 30 hops max, 60 byte packets
232233
1 10.0.0.4 (10.0.0.4) 1.404 ms 1.403 ms 1.398 ms
233234
```

articles/virtual-network/tutorial-tap-virtual-network-cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Read [prerequisites](virtual-network-tap-overview.md#prerequisites) before you c
8282
--query id \
8383
--out tsv)
8484
```
85+
8586
- Create the virtual network TAP using the ID of the frontend IP configuration as the destination and an optional port property. The port specifies the destination port on front end IP configuration where the TAP traffic will be received :
8687
8788
```azurecli-interactive
@@ -136,7 +137,7 @@ Read [prerequisites](virtual-network-tap-overview.md#prerequisites) before you c
136137

137138
## Delete the TAP configuration on a network interface
138139

139-
```azure-cli-interactive
140+
```azurecli-interactive
140141
az network nic vtap-config delete \
141142
--resource-group myResourceGroup \
142143
--nic myNetworkInterface \

articles/virtual-network/virtual-network-ipv4-ipv6-dual-stack-cli.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ az feature register --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
3939
```
4040
It takes up to 30 minutes for feature registration to complete. You can check your registration status by running the following Azure CLI command:
4141

42-
```azurelci
42+
```azurecli
4343
az feature show --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
4444
az feature show --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
4545
```
46+
4647
After the registration is complete, run the following command:
4748

48-
```azurelci
49+
```azurecli
4950
az provider register --namespace Microsoft.Network
5051
```
52+
5153
## Create a resource group
5254

5355
Before you can create your dual-stack virtual network, you must create a resource group with [az group create](/cli/azure/group). The following example creates a resource group named *DsResourceGroup01* in the *eastus* location:
@@ -146,12 +148,14 @@ az network lb address-pool create \
146148
--name dsLbBackEndPool_v6 \
147149
--resource-group DsResourceGroup01
148150
```
151+
149152
### Create a health probe
150153
Create a health probe with [az network lb probe create](https://docs.microsoft.com/cli/azure/network/lb/probe?view=azure-cli-latest) to monitor the health of the virtual machines.
151154

152155
```azurecli
153156
az network lb probe create -g DsResourceGroup01 --lb-name dsLB -n dsProbe --protocol tcp --port 3389
154157
```
158+
155159
### Create a load balancer rule
156160

157161
A load balancer rule is used to define how traffic is distributed to the VMs. You define the frontend IP configuration for the incoming traffic and the backend IP pool to receive the traffic, along with the required source and destination port.
@@ -295,7 +299,7 @@ az network vnet subnet create \
295299
### Create NICs
296300

297301
Create virtual NICs for each VM with [az network nic create](https://docs.microsoft.com/cli/azure/network/nic?view=azure-cli-latest#az-network-nic-create). The following example creates a virtual NIC for each VM. Each NIC has two IP configurations (1 IPv4 config, 1 IPv6 config). You create the IPV6 configuration with [az network nic ip-config create](https://docs.microsoft.com/cli/azure/network/nic/ip-config?view=azure-cli-latest#az-network-nic-ip-config-create).
298-
302+
299303
```azurecli
300304
# Create NICs
301305
az network nic create \
@@ -358,6 +362,7 @@ Create virtual machine *dsVM0* as follows:
358362
--availability-set dsAVset \
359363
--image MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest
360364
```
365+
361366
Create virtual machine *dsVM1* as follows:
362367

363368
```azurecli

articles/virtual-network/virtual-network-ipv4-ipv6-dual-stack-standard-load-balancer-cli.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,20 @@ To use the IPv6 for Azure virtual network feature, you must configure your subsc
3535
az feature register --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
3636
az feature register --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
3737
```
38+
3839
It takes up to 30 minutes for feature registration to complete. You can check your registration status by running the following Azure CLI command:
3940

40-
```azurelci
41+
```azurecli
4142
az feature show --name AllowIPv6VirtualNetwork --namespace Microsoft.Network
4243
az feature show --name AllowIPv6CAOnStandardLB --namespace Microsoft.Network
4344
```
45+
4446
After the registration is complete, run the following command:
4547

46-
```azurelci
48+
```azurecli
4749
az provider register --namespace Microsoft.Network
4850
```
51+
4952
## Create a resource group
5053

5154
Before you can create your dual-stack virtual network, you must create a resource group with [az group create](/cli/azure/group). The following example creates a resource group named *DsResourceGroup01* in the *eastus* location:
@@ -151,6 +154,7 @@ Create a health probe with [az network lb probe create](https://docs.microsoft.c
151154
```azurecli
152155
az network lb probe create -g DsResourceGroup01 --lb-name dsLB -n dsProbe --protocol tcp --port 3389
153156
```
157+
154158
### Create a load balancer rule
155159

156160
A load balancer rule is used to define how traffic is distributed to the VMs. You define the frontend IP configuration for the incoming traffic and the backend IP pool to receive the traffic, along with the required source and destination port.
@@ -357,6 +361,7 @@ Create virtual machine *dsVM0* as follows:
357361
--availability-set dsAVset \
358362
--image MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest
359363
```
364+
360365
Create virtual machine *dsVM1* as follows:
361366

362367
```azurecli

articles/virtual-network/virtual-network-multiple-ip-addresses-cli.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ You can add additional private and public IP addresses to an existing Azure netw
171171

172172
To add a private IP address to a NIC, you must create an IP configuration using the command that follows. The static IP address must be an unused address for the subnet.
173173

174-
```bash
174+
```azurecli
175175
az network nic ip-config create \
176176
--resource-group myResourceGroup \
177177
--nic-name myNic1 \
@@ -191,7 +191,7 @@ You can add additional private and public IP addresses to an existing Azure netw
191191

192192
Whenever you add a public IP address in a new IP configuration, you must also add a private IP address, because all IP configurations must have a private IP address. You can either add an existing public IP address resource, or create a new one. To create a new one, enter the following command:
193193

194-
```bash
194+
```azurecli
195195
az network public-ip create \
196196
--resource-group myResourceGroup \
197197
--location westcentralus \
@@ -201,7 +201,7 @@ You can add additional private and public IP addresses to an existing Azure netw
201201

202202
To create a new IP configuration with a static private IP address and the associated *myPublicIP3* public IP address resource, enter the following command:
203203

204-
```bash
204+
```azurecli
205205
az network nic ip-config create \
206206
--resource-group myResourceGroup \
207207
--nic-name myNic1 \
@@ -213,7 +213,7 @@ You can add additional private and public IP addresses to an existing Azure netw
213213
- **Associate the resource to an existing IP configuration**
214214
A public IP address resource can only be associated to an IP configuration that doesn't already have one associated. You can determine whether an IP configuration has an associated public IP address by entering the following command:
215215

216-
```bash
216+
```azurecli
217217
az network nic ip-config list \
218218
--resource-group myResourceGroup \
219219
--nic-name myNic1 \
@@ -230,7 +230,7 @@ You can add additional private and public IP addresses to an existing Azure netw
230230

231231
Since the **PublicIpAddressId** column for *IpConfig-3* is blank in the output, no public IP address resource is currently associated to it. You can add an existing public IP address resource to IpConfig-3, or enter the following command to create one:
232232

233-
```bash
233+
```azurecli
234234
az network public-ip create \
235235
--resource-group myResourceGroup
236236
--location westcentralus \
@@ -241,7 +241,7 @@ You can add additional private and public IP addresses to an existing Azure netw
241241

242242
Enter the following command to associate the public IP address resource to the existing IP configuration named *IPConfig-3*:
243243

244-
```bash
244+
```azurecli
245245
az network nic ip-config update \
246246
--resource-group myResourceGroup \
247247
--nic-name myNic1 \
@@ -251,7 +251,7 @@ You can add additional private and public IP addresses to an existing Azure netw
251251

252252
3. View the private IP addresses and the public IP address resource Ids assigned to the NIC by entering the following command:
253253

254-
```bash
254+
```azurecli
255255
az network nic ip-config list \
256256
--resource-group myResourceGroup \
257257
--nic-name myNic1 \

articles/vpn-gateway/create-routebased-vpn-gateway-cli.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ If you choose to install and use the CLI locally, this article requires that you
2525
Create a resource group using the [az group create](/cli/azure/group) command. A resource group is a logical container into which Azure resources are deployed and managed.
2626

2727

28-
```azurecli-interactive
28+
```azurecli-interactive
2929
az group create --name TestRG1 --location eastus
3030
```
3131

3232
## <a name="vnet"></a>Create a virtual network
3333

3434
Create a virtual network using the [az network vnet create](/cli/azure/network/vnet) command. The following example creates a virtual network named **VNet1** in the **EastUS** location:
3535

36-
```azurecli-interactive
36+
```azurecli-interactive
3737
az network vnet create \
3838
-n VNet1 \
3939
-g TestRG1 \
@@ -47,7 +47,7 @@ az network vnet create \
4747

4848
The gateway subnet contains the reserved IP addresses that the virtual network gateway services use. Use the following examples to add a gateway subnet:
4949

50-
```azurepowershell-interactive
50+
```azurecli-interactive
5151
az network vnet subnet create \
5252
--vnet-name VNet1 \
5353
-n GatewaySubnet \
@@ -97,7 +97,7 @@ az network vnet-gateway show \
9797

9898
The response looks similar to this:
9999

100-
```
100+
```output
101101
{
102102
"activeActive": false,
103103
"bgpSettings": null,
@@ -155,7 +155,7 @@ The value associated with the **ipAddress** field is the public IP address of yo
155155

156156
Example response:
157157

158-
```
158+
```output
159159
{
160160
"dnsSettings": null,
161161
"etag": "W/\"a12d4d03-b27a-46cc-b222-8d9364b8166a\"",
@@ -166,6 +166,7 @@ Example response:
166166
"etag": null,
167167
"id": "/subscriptions/<subscription ID>/resourceGroups/TestRG1/providers/Microsoft.Network/virtualNetworkGateways/VNet1GW/ipConfigurations/vnetGatewayConfig0",
168168
```
169+
169170
## Clean up resources
170171

171172
When you no longer need the resources you created, use [az group delete](/cli/azure/group) to delete the resource group. This will delete the resource group and all of the resources it contains.

0 commit comments

Comments
 (0)