All
I am attempting to run a script that will create multiple VM's from a template and then customize each by way of a OSCustomization.
The script reads as (very simple)
New-vm -vmhost xxxxxxxxx -Name xxxxxxxx -Template TEMPLATE-2K8R2EEx64 -Datastore xxxxxxxxxx -OSCustomizationspec OSCust-TEMPLATE-2K8R2EEx64
The error I am reacieving is
Use this to see the blue folder where the template is supposedly located.
Get-Template | Select Name,@{N="Folder";E={(Get-View $_.ExtensionData.Parent).Name}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Strange...
I've only seen this when connecting to multiple vcenters...
As names are specific to a datacenter (if i remember well) it means that templates with the same name cannot coexist in one datacenter.
You could browse the "infrastructure" by trying to lookup the parent of the templates (follow the trail up to the datacenter).
Use this to see the blue folder where the template is supposedly located.
Get-Template | Select Name,@{N="Folder";E={(Get-View $_.ExtensionData.Parent).Name}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD
Thanks for this command this pointed me to a folder in our DR environment where the template had been copied for testing. Thanks again.