I had to share this awesome script I found on Github.
All credit goes to:
File Name : vDiagram_2.0.8.ps1 Author : Tony Gonzalez Author : Jason Hopkins Based on : vDiagram by Alan Renouf Version : 2.0.8
Direct Link –
It took about 20 minutes to audit and diagram 3 ESXi hosts with about 90 VMs. This was completed on an i5 Lenovo laptop with 8GB RAM