Are you looking for something like this:
Get-Datacenter | Get-VM |%{$VMName = $_.Name; Get-VM $VMName | Get-Datastore} | Select-Object DataCenter, @{Expression={$VMName};Label="VMName";}, Name, FreeSpaceGB, CapacityGB
Are you looking for something like this:
Get-Datacenter | Get-VM |%{$VMName = $_.Name; Get-VM $VMName | Get-Datastore} | Select-Object DataCenter, @{Expression={$VMName};Label="VMName";}, Name, FreeSpaceGB, CapacityGB