NSX-T: Find and Delete Orphaned Ports


Summary:

Basically had a bunch of orphaned ports (65000+), don't know why or how it happened (hypothetically NTP related), but needed to clean them up.  Doing it via UI was obviously not an option as it would only return 50 ports per page at a time.  Oh and it wouldn't refresh after every delete.

Details:

I'm saying 'orphaned', but in reality I'm only keying off the idea that the port is reporting "Operationally Down".  This could simply be a powered off VM, but there is little harm in deleting these type of ports as they will simply be recreated if that VM were to be powered up.  

This may not apply in all situations, so use this with caution.

Powershell Example(s):


References:

https://www.virten.net/2021/03/error-when-connecting-virtual-machine-to-nsx-t-segments/

Comments

Popular posts from this blog

NSX-T: Release associated invalid node ID from certificate

VMware | AVS: Content Library or Non vCenter objects on VSAN produces unassociated but valid objects

Misc: Navien NPE-240A Navilink App missing scheduling function