Quantcast
Viewing all articles
Browse latest Browse all 175326

Rename multiple VM's using txt file

I am looking for a PowerShell/PowerCLI script/way to rename 180 (only the display name not the vmdk/vmx files) vm's located in txt file under C:\Temp\vmlist.txt.

 

Is there a way to do it better then running the below command multiple (180) times

set-vm Old-VM-NAME1 -name 'New-VM-Name1' -confirm:$false

set-vm Old-VM-NAME2 -name 'New-VM-Name2' -confirm:$false

set-vm Old-VM-NAME3 -name 'New-VM-Name3' -confirm:$false


Viewing all articles
Browse latest Browse all 175326

Trending Articles



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