This script will report all VMs and the name of the datastore.
Just fill in the name of your vCenter Server in the first line:
Connect-VIServer vCenter-Server
foreach($ds in Get-Datastore){
foreach($vm in ($ds | Get-VM)){
$vm | Select @{N="VMname";E={$_.Name}},
@{N="DSName";E={$ds.Name}}
}
}