Skip to content

Commit bd5811e

Browse files
authored
Update remove-public-ip-address-vm.md
1 parent 8370649 commit bd5811e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/virtual-network/ip-services/remove-public-ip-address-vm.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ In this task, you use the [az network nic-ip-config update](/cli/azure/network/n
6767

6868
The following example dissociates a public IP address named *myVMPublicIP* from an IP configuration named *ipconfigmyVM* of an existing network interface named *myVMNic* that is attached to a VM named *myVM* in a resource group named *myResourceGroup*.
6969

70-
```azurecli-interactive
70+
```azurecli
7171
# Dissociate the public IP address from the IP configuration
7272
az network nic ip-config update \
7373
--name ipconfigmyVM \
@@ -80,7 +80,7 @@ az network nic ip-config update \
8080

8181
If you don't know the name of the network interface attached to your VM, use the [az vm nic list](/cli/azure/vm/nic#az-vm-nic-list) command to view them. For example, the following command lists the names of the network interfaces attached to a VM named *myVM* in a resource group named *myResourceGroup*:
8282

83-
```azurecli-interactive
83+
```azurecli
8484
# List the network interfaces attached to a VM
8585
az vm nic list --vm-name myVM --resource-group myResourceGroup
8686
```
@@ -97,7 +97,7 @@ In the previous example, *myVMVic* is the name of the network interface.
9797

9898
If you don't know the name of the IP configuration of a network interface, use the [az network nic ip-config list](/cli/azure/network/nic/ip-config#az-network-nic-ip-config-list) command to retrieve them. For example, the following command lists the names of the IP configurations for a network interface named *myVMNic* in a resource group named *myResourceGroup*:
9999

100-
```azurecli-interactive
100+
```azurecli
101101
# List the IP configurations of a network interface
102102
az network nic ip-config list --nic-name myVMNic --resource-group myResourceGroup --out table
103103
```
@@ -116,7 +116,7 @@ In the previous example, *ipconfigmyVM* is the name of the IP configuration.
116116

117117
If you don't know the name of the public IP address associated to an IP configuration, use the [az network nic ip-config show](/cli/azure/network/nic/ip-config#az-network-nic-ip-config-show) command to retrieve them. For example, the following command lists the names of the public IP addresses for a network interface named *myVMNic* in a resource group named *myResourceGroup*:
118118

119-
```azurecli-interactive
119+
```azurecli
120120
# Get the name of public IP address associated to an IP configuration
121121
az network nic ip-config show --name ipconfigmyVM --nic-name myVMNic --resource-group myResourceGroup --query publicIpAddress.id
122122
```
@@ -165,7 +165,7 @@ In the previous example, *myVMNic* is the name of the network interface.
165165

166166
If you don't know the name of an IP configuration for a network interface, use the [Get-AzNetworkInterface](/powershell/module/Az.Network/Get-AzNetworkInterface) command to retrieve them. For example, the following command lists the names of the IP configurations for a network interface named *myVMNic* in a resource group named *myResourceGroup*:
167167

168-
```azurepowershell-interactive
168+
```azurepowershell
169169
# Get the name of the IP configuration for a network interface
170170
$nic = Get-AzNetworkInterface -Name myVMNic -ResourceGroupName myResourceGroup
171171
$nic.IPConfigurations.Id
@@ -183,7 +183,7 @@ In the previous example, *ipconfigmyVM* is the name of the IP configuration.
183183

184184
If you don't know the name of the public IP address associated to an IP configuration, use the [Get-AzNetworkInterface](/powershell/module/Az.Network/Get-AzNetworkInterface) command to retrieve them. For example, the following command lists the name of the public IP addresses for a network interface named *myVMNic* in a resource group named *myResourceGroup*:
185185

186-
```azurepowershell-interactive
186+
```azurepowershell
187187
# Get the name of the public IP address associated to an IP configuration
188188
$nic = Get-AzNetworkInterface -Name myVMNic -ResourceGroupName myResourceGroup
189189
$nic.IPConfigurations.PublicIpAddress.Id

0 commit comments

Comments
 (0)