VMware Cloud Community
jimbo667
Contributor
Contributor
Jump to solution

Get VMX path of a VM?

Hi,

Just wondering how you can find the VMX file of a VM so you can add it to another vCenter?

The aim of what I am doing is to Unregister a powered off VM from one VC and Re-Register it in another VC and for the life of me I can't figure out what the "-VMFilePath" value/format should be when trying to re-add it when using New-VM.

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

In PowerCLI 4.1 you can do

Get-VM | Select Name, @{N="VMX";E={$_.Extensiondata.Summary.Config.VmPathName}}

____________

Blog: LucD notes

Twitter: lucd22


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

View solution in original post

3 Replies
LucD
Leadership
Leadership
Jump to solution

In PowerCLI 4.1 you can do

Get-VM | Select Name, @{N="VMX";E={$_.Extensiondata.Summary.Config.VmPathName}}

____________

Blog: LucD notes

Twitter: lucd22


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

jimbo667
Contributor
Contributor
Jump to solution

Cheers Mate! Worked a Charm!

0 Kudos
DineshMahesh696
Contributor
Contributor
Jump to solution

Worked for me, Great Thanks

0 Kudos