Mass delete vWires without VMs attached

This post was originally published on this site

Is there an easy way (api call) to remove all logical switches (vWires) in NSX-V that have no VMs attached that belong to a specific transport zone.


I have 2270 vWires belonging to TransportZ2 that are no longer being used and all of the VMs that were attached have been deleted from disk.

How can I perform a mass delete? Keeping in mind that I have another 300 vWires with VMs attached that I do not want to delete.


Thank you,



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.