How to find the Datastore name for a VM by powercli. Currently the VM shows as Orphaned VM in the vCenter. So i need to check the Datastore name where the VM resides?
Thanks in advance.
Thanks for the quick reply.
That's right. That gives the result.
But VM folder or files doesn't exist in the Datastore. So is there any way to to find the VM folder name or vmdk file for this VM in the entire datastore.?
Well, I hope the VM hasn't been deleted accidentally. Try "get-datastore -VM <VM Name> -refresh". I believe it should look at all known datastores and list the ones that contain this VM.