Got PowerCli 4.1.1 and can't seem to get a script to register my templates in vCenter 4.1. Every script registers the .vmtx files as .vmx files in vCenter inventory. Then they are unusable. Any help would be appreciated!!
That is possible, you can do something like this
Register-VMX -dsNames “datastore″ -template:$true
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Have a look at my Raiders of the Lost VMX post. With the Template switch it allows you to register templates.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LucD, I'll have a go at it in the morning. I have all my templates on a single datastore. This is a pretty involved script. Is there a way to pair it down to register just templates and just from a single datastore. I need to make it as simple as possible for my customer.
Thanks!
That is possible, you can do something like this
Register-VMX -dsNames “datastore″ -template:$true
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD, that worked like a charm!! Thanks!!! Is there a way to direct the registered templates into a specific blue folder?
The script currenly doesn't allow a target folder to register the VMs or Templates.
And the problem with a "blue" folder is that I can't use that as a parameter in the RegisterVM_Task.
I think you better use the Move-Template cmdlet, after the template is registered, to move it to a specific blue folder.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks again Luc!! I am deploying VMs from templates using powercli 4.1.1. My VMs have multiple virtual NICs. How can I add the ability to my deployment script to change the network label/name for each of these NICs?
Did you try the Set-NetworkAdapter cmdlet ?
If you can explain me how the change has to be done (which portgroup to which portgroup on which NIC), I can provide you an example script.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Luc,
Got it figured out. Thanks!!