Vmware

Vmware PowerCLI finding VM and Datastore

If you are looking for a VM datastore with Vmware PowerCLI below is a very usefull code to check :

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

This is going to show you all the VMs and their datastore , but you can also put name of a VM in front of get-vm command.