You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/ip-services/remove-public-ip-address-vm.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ In this task, you use the [az network nic-ip-config update](/cli/azure/network/n
67
67
68
68
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*.
69
69
70
-
```azurecli-interactive
70
+
```azurecli
71
71
# Dissociate the public IP address from the IP configuration
72
72
az network nic ip-config update \
73
73
--name ipconfigmyVM \
@@ -80,7 +80,7 @@ az network nic ip-config update \
80
80
81
81
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*:
82
82
83
-
```azurecli-interactive
83
+
```azurecli
84
84
# List the network interfaces attached to a VM
85
85
az vm nic list --vm-name myVM --resource-group myResourceGroup
86
86
```
@@ -97,7 +97,7 @@ In the previous example, *myVMVic* is the name of the network interface.
97
97
98
98
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*:
99
99
100
-
```azurecli-interactive
100
+
```azurecli
101
101
# List the IP configurations of a network interface
102
102
az network nic ip-config list --nic-name myVMNic --resource-group myResourceGroup --out table
103
103
```
@@ -116,7 +116,7 @@ In the previous example, *ipconfigmyVM* is the name of the IP configuration.
116
116
117
117
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*:
118
118
119
-
```azurecli-interactive
119
+
```azurecli
120
120
# Get the name of public IP address associated to an IP configuration
121
121
az network nic ip-config show --name ipconfigmyVM --nic-name myVMNic --resource-group myResourceGroup --query publicIpAddress.id
122
122
```
@@ -165,7 +165,7 @@ In the previous example, *myVMNic* is the name of the network interface.
165
165
166
166
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*:
167
167
168
-
```azurepowershell-interactive
168
+
```azurepowershell
169
169
# Get the name of the IP configuration for a network interface
@@ -183,7 +183,7 @@ In the previous example, *ipconfigmyVM* is the name of the IP configuration.
183
183
184
184
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*:
185
185
186
-
```azurepowershell-interactive
186
+
```azurepowershell
187
187
# Get the name of the public IP address associated to an IP configuration
0 commit comments