What does this return ?
foreach ($VM in $thickVMs) {
$ds = Get-VMHost -VM $vm | Get-Datastore | where { ($_.name) -ne "ISOs" -and ($vm | Get-Datastore | %{$_.Name}) -notcontains $_.Name} |
sort FreespaceGB -Descending | select -First 1 | Select -ExpandProperty Name
$vm | Select Name,@{N="Datastore";E={$ds}}
}