VMware Cloud Community
TheVMinator
Expert
Expert

Automate Converting templates to VMs with PowerCLI

Here is what I'd like to do with PowerCLI,

1.  Select a group of templates from a folder

2.  Convert those templates to virtual machines, keeping the same name and the same cluster

When converting a template to a VM using vSphere client, it prompts you what cluster you want to put it on.  I want powercli to assume that the cluster the template is currently located on is the same one the converted Virtual machine should go on, without prompting me.

Thanks

0 Kudos
1 Reply
LucD
Leadership
Leadership

This should do the trick

Get-Folder -Name MyFolder | Get-Template | Set-Template -ToVM -Confirm:$false 


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

0 Kudos