Delete a NIC from Azure w/powershell

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Travis Sobeck Travis Sobeck 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #54218
    Profile photo of Travis Sobeck
    Travis Sobeck
    Participant

    I'm trying to delete a vm w/powershell and its nic/publicIP/vhds. Deleting the vm and disk is working, but I can't seem to find a way to delete the NIC. I thought Remove-AzureRmVMNetworkInterface should do it after deleting the vm, but that doesn't seem to do anything (or maybe it only works to disconnect a nic from a vm if you have multiple nics and remove one). Anyone know what the cmdlet is to actually delete a nic? Thanks.

    #54219
    Profile photo of Travis Sobeck
    Travis Sobeck
    Participant

    Doh! spent way too much time on this.
    Remove-AzureRmNetworkInterface -ResourceGroupName $resourceGroupName -Name $net.Name -Force

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.