jpsider
Expert
Expert

What output do you want?

Get-VM $vm | select Name, @{N="Datastore";E={Get-Datastore -vm $_}

That will get you the same info without having to convert.