A good friend of mine who’s powershell foo is much stronger than mine shared this snip of powershell. It can be used to collect the IP addresses of your vMotion interfaces. It’s pretty much run and go.
$Array = @()
$Clusters = Get-Cluster | Sort Name
ForEach ($Cluster in $Clusters){
$VmHosts = $Cluster | Get-VmHost | Where {$_.ConnectionState -eq “Connected”} | Sort Name
ForEach ($VmHost in $VmHosts){
$Array += Get-VMHostNetworkAdapter -VMHost $VmHost.Name -VMKernel | Where {$_.VMotionEnabled -eq “True”} | select VmHost,IP
}
}
$Array | Out-GridView
That’s pretty much it. You can adjust the Out-GridView to something else if you want Export-CSV.