How to delete a public IP address from VM in Azure

This Azure article will discuss how to delete a public IP address from VM in Azure.

How to delete a public IP address from VM in Azure

We will discuss How to dissociate public IP in Azure VM or delete public IP in Azure virtual machine by following the steps below.

1. Login to https://portal.azure.com/

2. Search for Virtual machines there.

dissociate public ip in azure vm

You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, ResourceGroup, Location, etc.

Delete public IP in Azure VM

4. Now click on the virtual machine it will open the Overview tab. Click on the Public IP address.

How to delete public ip in azure vm

5. Click the Dissociate or Delete buttons from the Public IP address page, then select Yes for confirmation.

How to dissociate public ip in azure vm

How to delete public IP in Azure VM using PowerShell

We will discuss How to dissociate public IP in Azure VM or delete public IP in Azure virtual machine using PowerShell by following the steps below.

1. Sign in to Azure with Connect-AzAccount

PS C:\windows\system32> Connect-AzAccount

2. Execute the below cmdlet, then

 $mynic = Get-AzNetworkInterface -Name MyNewAZVMNic -ResourceGroup newresgroup
 $mynic.IpConfigurations.publicipaddress.id = $null
 Set-AzNetworkInterface -NetworkInterface $mynic
How to delete public IP in Azure VM using PowerShell

You may also like the following the below articles

Conclusion

In this Azure article, we discussed how to delete a public IP address from VM in Azure.