VMware Cloud Community
MariusRoma
Expert
Expert

Getting the path of a VM in the datastore

I apologize for the very basic question.

I created a new VM on Datastore1 whose name was "MyVM".

The files were created in Datastore1\MyVM

I renamed the VM as "NewVM" but the files are still in Datastore1\MyVM and will remain there untuil I move the VM to a different datastore.

Which property should I query to see that NewVM files are still in Datastore1\MyVM?

Regards

marius

1 Reply
LucD
Leadership
Leadership

You can do something like this

Get-VM |

Select Name,@{N='Folder';E={$_.ExtensionData.Config.Files.VmPathName}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference