Quantcast
Channel: VMware Communities : All Content - VMware PowerCLI
Viewing all articles
Browse latest Browse all 16717

Rename and Backup VM vmx file

$
0
0

Is there a way to rename a vmx file by appending a string to the vmx filename in the same VM folder?

 

PS C:\>(Get-VM TestVM).ExtensionData.Config.Files

 


VmPathName          : [vSAN-Compute-Cluster] c224f15d-f813-5dc8-24ac-e4434b62be10/TestVM.vmx

SnapshotDirectory   : [vSAN-Compute-Cluster] c224f15d-f813-5dc8-24ac-e4434b62be10/

SuspendDirectory    : [vSAN-Compute-Cluster] c224f15d-f813-5dc8-24ac-e4434b62be10/

LogDirectory        : [vSAN-Compute-Cluster] c224f15d-f813-5dc8-24ac-e4434b62be10/

FtMetadataDirectory :

 

I'd like to be able to copy the renamed file in the same folder while keeping the original .vmx file in the same LogDirectory folder. I looked at PowerCLI Script to Backup all VMX files but the backup destination is set to the local temp folder which isn't what my requirement is.


Viewing all articles
Browse latest Browse all 16717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>