VMware Cloud Community
linusmid
Contributor
Contributor

Change vcloud template to Goldmaster

Im building a script that creates a vApp template from an existing vApp i vCloud.

The problem is that im not able to change the attribute IsGoldMaster on the existing vApp template created.

This is what im using to create the template:

$myVApp = Get-CIVApp vAppname

#Create template from vApp

$myVApp | New-CIVAppTemplate -Name $templatename -OrgVdc $vcloudorg -Catalog $Catalog -Description 'UpdatedTemplate' -CustomizeOnInstantiate:$true

I see there is a way to add the -GoldMaster switch on the Import-CIVappTemplate but not on New-CIVappTemplate command. Is it possible to change IsGoldMaster attribute on existing template?
Or do anyone have a better way to do this?

Regards,

Linus

0 Kudos
1 Reply
Daveyb0y
Contributor
Contributor

I guess you sorted this already, but as I found your post unanswered, I thought I'd stick a solution in here for any future visitors..

$template = get-civapptemplate -name "xyz"

$template.ExtensionData.goldmaster = $true

$template.ExtensionData.UpdateServerData()

Enjoy.

0 Kudos