Since the snapshot files of a VM do not necessarily need to be on the same datastore as the VM homefolder, you could just look at all snapshots and extract those that are on the specific datastore.
Something like this
$dsName="MyDS"
foreach($vminGet-VM){ $keys=$vm.ExtensionData.LayoutEx.Snapshot|%{$_.Disk|%{$_.Chain|%{$_.FileKey}}} $vm.ExtensionData.LayoutEx.File|where {$keys-contains$_.Key-and$_.Name-match$dsName} |
Select@{N="VM";E={$vm.Name}},Name
}