Well, those are 2 entirely different things.
Collecting the network config of your ESXi servers is quite straight-forward.
Alan did a good post on that in his PowerCLI: vProfiles. It might not be exactly what you are looking for, but it should give you a good idea what information can be retrieved.
Btw are these standard switches or distributed scwitches, or a mix ?
Collecting network configs from the guest OS is a bit different.
There are a number of supported guest OS for which this is supported by the Get-VMGuestNetworkInterface cmdlet, but there are some guest OS that are not supported for this cmdlet.
Which OS are you looking at ?