question

JohanSomers-5454 avatar image
0 Votes"
JohanSomers-5454 asked suvasara-MSFT answered

Can't remove resources

I want to clean up our azure and remove the virtual network, because we don't use it anymore, but i keep getting messages that I can't delete the resource because another resource is linked to it, but the final resource is a Virtual machine with resource number JQHOZW0ZBGRMGCP.7d34569e witch Azure cannot find

azure-virtual-machinesazure-virtual-network
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

suvasara-MSFT avatar image
0 Votes"
suvasara-MSFT answered

@JohanSomers-5454 , please go through this similar ask answered by me. Here are the commands to delete those ghosted nics,

  Get-AzNetworkInterface | where-object { $_.VirtualMachine -eq $null } | ft name
  Get-AzNetworkInterface | where-object { $_.VirtualMachine -eq $null } | Remove-AzNetworkInterface -Force





Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.