This script will connect to a vCenter server and list all hosts it can see and the version of ESXi running on the host. I have also exported this to a csv
Add-PSSnapinVMware.VimAutomation.Core Connect-VIServer-Server vSphereServerName Get-VMHost | Select Name,Version,@{N="vCenter";E={$_.ExtensionData.CLient.ServiceUrl.Split('/')[2]}} |ft name,version | Out-File FileLocation
![Share on Facebook Facebook](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/facebook.png)
![Share on Twitter twitter](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Share on Google+ google_plus](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/google_plus.png)
![Share on Linkedin linkedin](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/linkedin.png)
![feather](http://computercrashers.co.uk/wp-content/plugins/social-media-feather/synved-social/image/icon.png)