See if this makes a difference in execution time
$row.VMs=[int]$($_.vm.count)
$row.VMsHosted= [string]::Join("|",(Get-View $_.VM -Property Name| %{$_.Name}))$row.Hosts=[int]$($_.host.count)
$row.HostsConnected= [string]::Join("|",(Get-View ($_.Host | Select -ExpandProperty Key) -Property Name | %{$_.Name.Split('.')[0]}))