Backtrack:  
 
by lunarg on December 5th 2015, at 13:19

You can quickly get a list of VMs, the datastores they are using and the logical folder they are in through PowerCLI:

Get-VM | Select Name,@{N="Datastore";E={[string]::Join(',',(Get-Datastore -Id $_.DatastoreIdList | Select -ExpandProperty Name))}},@{N="Folder";E={$_.Folder.Name}}

Combine it with Export-CSV to export the results to a CSV file.